Contiki 3.x
Data Structures | Functions
utc_time.h File Reference

Utility functions for operating on UTC times. More...

#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  tm
 tm More...
 

Functions

void epoch_to_tm (const time_t *timer, struct tm *const tmp)
 Convert a UNIX epoch to a tm struct. More...
 
time_t tm_to_epoch (struct tm *const tmp)
 Convert a tm struct to a UNIX epoch. More...
 

Detailed Description

Utility functions for operating on UTC times.

Convenient functions for converting between the epoch and the tm struct.

Definition in file utc_time.h.

Function Documentation

void epoch_to_tm ( const time_t *  timer,
struct tm *const  tmp 
)

Convert a UNIX epoch to a tm struct.

Parameters
timerThe UNIX epoch
tmpThe tm struct to conver to

Referenced by tm_to_epoch().

time_t tm_to_epoch ( struct tm *const  tmp)

Convert a tm struct to a UNIX epoch.

Parameters
tmpThe tm struct to convert
Returns
The UNIX epoch

Definition at line 112 of file tm_to_epoch.c.

References epoch_to_tm().