DC_PARSER_GET_DATETIME(3)

πŸ“¦ version 0.9.0, in nixos 26.05, nixpkgs unstable

πŸ’… DC_PARSER_GET_DATETIME(3) πŸ’…

okay so bestie, welcome to the manual page for dc_parser_get_datetime β€” it lives in the Library Functions Manual section, and it's brought to you by the fine folks behind the libdivecomputer library, no cap 🫢


🌸 NAME 🌸

dc_parser_get_datetime β€” the girl whose whole job is pulling the date and time out of a parsed dive ✨


πŸŽ€ LIBRARY πŸŽ€

she's from the library libdivecomputer, periodt πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <libdivecomputer/parser.h>

dc_status_t
dc_parser_get_datetime(dc_parser_t *parser, dc_datetime_t *datetime);

✨ DESCRIPTION ✨

So basically, this function extracts the date and time of a dive, fr fr πŸ•°οΈ You hand her a parser that you've already initialised with dc_parser_new(3) beforehand (like, don't skip that step, bestie), and she gives you the broken-down time-stamp of the dive β€” in the local time of the dive. That's the vibe. That's the whole assignment. 🌈

Lowkey important detail: the dc_parser_get_datetime function may internally invoke dc_datetime_gmtime(3) or dc_datetime_localtime(3). iykyk 😌


πŸ’– RETURN VALUES πŸ’–

  • DC_STATUS_SUCCESS β€” slay, the date and time were retrieved πŸŽ‰
  • DC_STATUS_UNSUPPORTED β€” okay so the device just doesn't support date and time, it's giving "not my era" 😭
  • other error messages β€” if something else goes wrong on further failure πŸ’€

πŸ”₯ SEE ALSO πŸ”₯

all of them iconic, all of them worth the read πŸ‘‘


πŸ‘‘ AUTHORS πŸ‘‘

The library libdivecomputer was written by Jef Driesen, jef@libdivecomputer.org β€” king behavior honestly. And the manpages were written by Kristaps Dzonsons, kristaps@bsd.lv. absolute legends both 🫢


and that's the whole page, bestie! πŸ’œ this cutie came to you from the Debian crew, dated January 5, 2017, and her header/footer energy is DC_PARSER_GET_DATETIME(3) all day long. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from