DC_PARSER_GET_DATETIME(3)

DC_PARSER_GET_DATETIME(3) | Library Functions Manual | DC_PARSER_GET_DATETIME(3)

# NAME

`dc_parser_get_datetime` —
extract the date and time from a parsed dive

# LIBRARY

library “libdivecomputer”

# SYNOPSIS

`#include <libdivecomputer/parser.h>`

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

# DESCRIPTION

Extract the date and time of a dive, parser, previously initialised with dc_parser_new(3). This returns the broken-down time-stamp of the dive in the local time of the dive.

The `dc_parser_get_datetime` function may internally invoke dc_datetime_gmtime(3) or dc_datetime_localtime(3).

# RETURN VALUES

Returns `DC_STATUS_SUCCESS` if the date and time were retrieved, `DC_STATUS_UNSUPPORTED` if the date and time are not supported by the device, or other error messages on further failure.

# SEE ALSO

dc_datetime_gmtime(3), dc_datetime_localtime(3), dc_parser_new(3)

# AUTHORS

The library “libdivecomputer” library was written by Jef Driesen, jef@libdivecomputer.org. The manpages were written by
Kristaps Dzonsons, kristaps@bsd.lv.

January 5, 2017 | NetBSD 10.0