Source
56
56
}
57
57
zbx_time_unit_t;
58
58
59
59
double zbx_time(void);
60
60
void zbx_timespec(zbx_timespec_t *ts);
61
61
double zbx_current_time(void);
62
62
int zbx_is_leap_year(int year);
63
63
void zbx_get_time(struct tm *tm, long *milliseconds, zbx_timezone_t *tz);
64
64
long zbx_get_timezone_offset(time_t t, struct tm *tm);
65
65
struct tm *zbx_localtime(const time_t *time, const char *tz);
66
+
const struct tm *zbx_localtime_now(const time_t *time);
66
67
int zbx_utc_time(int year, int mon, int mday, int hour, int min, int sec, int *t);
67
68
int zbx_day_in_month(int year, int mon);
68
69
zbx_uint64_t zbx_get_duration_ms(const zbx_timespec_t *ts);
69
70
70
71
zbx_time_unit_t zbx_tm_str_to_unit(const char *text);
71
72
int zbx_tm_parse_period(const char *period, size_t *len, int *multiplier, zbx_time_unit_t *base, char **error);
72
73
void zbx_tm_add(struct tm *tm, int multiplier, zbx_time_unit_t base);
73
74
void zbx_tm_sub(struct tm *tm, int multiplier, zbx_time_unit_t base);
74
75
void zbx_tm_round_up(struct tm *tm, zbx_time_unit_t base);
75
76
void zbx_tm_round_down(struct tm *tm, zbx_time_unit_t base);