Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
DC_DATETIME_LOCALTIME(3)    Library Functions Manual  DC_DATETIME_LOCALTIME(3)

NAME
       dc_datetime_localtime --	convert	an timestamp to	local date and time

LIBRARY
       library "libdivecomputer"

SYNOPSIS
       #include	<libdivecomputer/datetime.h>

       dc_datetime_t *
       dc_datetime_localtime(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	local-time  representation  in
       result.	 The  filled-in	 value consists	of the year, month, day, hour,
       minute, and second fields.

       Note: unlike in struct tm, the value for	year is	normalised,  not  less
       1900; moreover, the value for month is from one,	not zero.

       The   dc_datetime_localtime   function  may  internally	invoke	libc's
       localtime(3), or	if available, localtime_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
       dc_datetime_gmtime(3), dc_datetime_mktime(3), dc_datetime_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.

FreeBSD	Ports 14.quarterly     January 11, 2017	      DC_DATETIME_LOCALTIME(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=dc_datetime_localtime&sektion=3&manpath=FreeBSD+Ports+14.3.quarterly>

home | help