11 extern struct tm *
gmtime();
35 struct tm *local, *gm;
int datetime_set_second(DateTime *dt, double second)
returns 0 on success or negative value on error
int datetime_set_day(DateTime *dt, int day)
if dt.mode = ABSOLUTE, then the dt.year, dt.month:
#define DATETIME_RELATIVE
void datetime_get_local_time(DateTime *dt)
set mode/from/to ABSOLUTE/YEAR/SECOND set the local time into 'dt' does not set timezone.
int datetime_set_hour(DateTime *dt, int hour)
returns 0 on success or negative value on error
int datetime_set_year(DateTime *dt, int year)
if dt.mode = ABSOLUTE, this also sets dt.day = 0
int datetime_set_type(DateTime *dt, int mode, int from, int to, int fracsec)
int datetime_get_local_timezone(int *minutes)
Returns: 0 OK -1 local timezone info not available.
int datetime_set_minute(DateTime *dt, int minute)
returns 0 on success or negative value on error
int datetime_difference(const DateTime *a, const DateTime *b, DateTime *result)
This performs the formula: result = a - b;.
int datetime_set_month(DateTime *dt, int month)
if dt.mode = ABSOLUTE, this also sets dt.day = 0
#define DATETIME_ABSOLUTE
int datetime_change_from_to(DateTime *dt, int from, int to, int round)
Changes the from/to of the type for dt. The 'from/to' must be legal values for the mode of dt; (if th...