1DC_DATETIME_GMTIME(3) BSD Library Functions Manual DC_DATETIME_GMTIME(3)
2
4 dc_datetime_gmtime — convert an timestamp to GMT date and time
5
7 library “libdivecomputer”
8
10 #include <libdivecomputer/datetime.h>
11
12 dc_datetime_t *
13 dc_datetime_gmtime(dc_datetime_t *result, dc_ticks_t ticks);
14
16 Convert an integral timestamp ticks created with dc_datetime_now(3) or
17 dc_datetime_mktime(3) into a broken-down GMT representation in result.
18 The filled-in value consists of the year, month, day, hour, minute, and
19 second fields.
20
21 Note: unlike in struct tm, the value for year is normalised, not less
22 1900; moreover, the value for month is from one, not zero.
23
24 The dc_datetime_gmtime function may internally invoke libc's gmtime(3),
25 or if available, gmtime_r(3).
26
28 This returns the result pointer on success. It returns NULL if ticks
29 cannot be sanely converted or if result is NULL.
30
32 dc_datetime_localtime(3), dc_datetime_mktime(3), dc_datetime_new(3)
33
35 The library “libdivecomputer” library was written by Jef Driesen,
36 jef@libdivecomputer.org. The manpages were written by
37 Kristaps Dzonsons, kristaps@bsd.lv.
38
39BSD January 11, 2017 BSD