24 int old_minutes, diff_minutes;
38 diff_minutes = minutes - old_minutes;
39 if (diff_minutes >= 0) {
#define DATETIME_RELATIVE
int datetime_is_valid_timezone(int minutes)
Returns: 1 OK: -720 <= minutes <= 780 (720 = 12 hours; 780 = 13 hours) 0 NOT OK.
int datetime_error(int code, char *msg)
record 'code' and 'msg' as error code/msg (in static variables) code==0 will clear the error (ie set ...
int datetime_get_timezone(const DateTime *dt, int *minutes)
returns 0 on success
int datetime_set_type(DateTime *dt, int mode, int from, int to, int fracsec)
void datetime_invert_sign(DateTime *dt)
int datetime_increment(DateTime *src, DateTime *incr)
This function changes the 'src' date/time data based on the 'incr' The type (mode/from/to) of the 'sr...
int datetime_set_minute(DateTime *dt, int minute)
returns 0 on success or negative value on error
int datetime_change_to_utc(DateTime *dt)
Return datetime_change_timezone (dt, 0);.
int datetime_change_timezone(DateTime *dt, int minutes)
if dt has a timezone, increment dt by minutes-dt.tz MINUTES and set dt.tz = minutes Returns: 0 OK dat...
void datetime_decompose_timezone(int tz, int *hours, int *minutes)
tz = abs(tz) *hour = tz/60 *minute = tz%60 Note: hour,minute are non-negative. Must look at sign of t...