DC_DATETIME_GMTIME(3)
π NAME π
okay so bestie, this is DC_DATETIME_GMTIME(3) from the Library Functions Manual, and it is literally here to convert a timestamp to GMT date and time. Iconic behavior from the libdivecomputer girlies. β¨
π LIBRARY π
library libdivecomputer β yes, that one. π«Ά
π SYNOPSIS π
#include <libdivecomputer/datetime.h>
dc_datetime_t *
dc_datetime_gmtime(dc_datetime_t *result, dc_ticks_t ticks);
β¨ DESCRIPTION β¨
Convert an integral timestamp ticks created with dc_datetime_now(3) or dc_datetime_mktime(3) into a broken-down GMT representation in result. The filled-in value consists of the year, month, day, hour, minute, and second fields. π
Note β and this is the iconic gotcha β unlike instruct tm, the value foryearis normalised, not βless 1900β; moreover, the value formonthis from one, not zero. π
The dc_datetime_gmtime function may internally invoke libc's gmtime(3), or if available, gmtime_r(3). π¦
π RETURN VALUES π
This returns the result pointer on success. It returns NULL if ticks cannot be sanely converted or if result is NULL. π
π SEE ALSO π
π AUTHORS π
The library libdivecomputer library was written by Jef Driesen, jef@libdivecomputer.org. The manpages were written by Kristaps Dzonsons, kristaps@bsd.lv. π«Ά
cute sign-off bestie: this page says Debian, dated January 11, 2017, with source/version line DC_DATETIME_GMTIME(3) β mwah, bye! ππ
π¦ where this page comes from
- nixos 26.05: libdivecomputer 0.9.0
- nixpkgs unstable: libdivecomputer 0.9.0
- Copyright (C) 2017 Kristaps Dzonsons <kristaps@bsd.lv>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms