User Manual

Epoch time returns a 32-bit unsigned integer value representing the number of seconds since 1 January 1970. For
example '1456472597' would convert to:
Fri, 26 Feb 2016 07:43:17 GMT
ISO8601 format timestamps return the time as a specifically formatted string similar to the timestamp below:
2016-02-18T17:12:46.061104
bool getISO8601Time ( iso8601_time_t* iso8601_time )
Updates 'iso8601_time' with the current timestamp in ISO8601 format.
Time is based on GMT and will need to be adjusted for your local timezone, depending on your specific location and
any seasonal adjustments (daylight savings time, etc.).
Parameters:
iso8601_time: A pointer to the 'iso8601_time_t' struct that will hold the timestamp data. (The typedef itself is
defined in adafruit_constants.h.)
Returns: 'True' (1) if the timestamp was successfully assigned, otherwise 'false' (0).
ISO8601 timestamps use the following struct (defined in 'adafruit_constants.h') to convert the timestamp into something
that can be printed as a null-terminated string, but also easily manipulated in code:
uint32_t getUtcTime ( void )
Returns the current 'Epoch' time (the number of seconds since the 1 January 1970).
Time is based on GMT and will need to be adjusted for your local timezone, depending on your specific location and
any seasonal adjustments (daylight savings time, etc.).
typedef struct ATTR_PACKED
{
char year[4]; /**< Year */
char dash1; /**< Dash1 */
char month[2]; /**< Month */
char dash2; /**< Dash2 */
char day[2]; /**< Day */
char T; /**< T */
char hour[2]; /**< Hour */
char colon1; /**< Colon1 */
char minute[2]; /**< Minute */
char colon2; /**< Colon2 */
char second[2]; /**< Second */
char decimal; /**< Decimal */
char sub_second[6]; /**< Sub-second */
char Z; /**< UTC timezone */
char nullterm; // not part of the format, make printf easier
} iso8601_time_t;
© Adafruit Industries https://learn.adafruit.com/introducing-the-adafruit-wiced-feather-wifi Page 66 of 202