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

FreeBSD Manual Pages

  
 
  

home | help
TM(3)			 BSD Library Functions Manual			 TM(3)

NAME
     tm	-- time	structure

SYNOPSIS
     #include <time.h>

DESCRIPTION
     The <time.h> header defines the tm	structure that contains	calendar dates
     and time broken down into components.  The	following standards-compliant
     fields are	present:

	   Type	   Field      Represents		     Range
	   int	   tm_sec     Seconds			     [0, 61]
	   int	   tm_min     Minutes			     [0, 59]
	   int	   tm_hour    Hours since midnight	     [0, 23]
	   int	   tm_mday    Day of the month		     [1, 31]
	   int	   tm_mon     Months since January	     [0, 11]
	   int	   tm_year    Years since 1900
	   int	   tm_wday    Days since Sunday		     [0, 6]
	   int	   tm_yday    Days since January 1	     [0, 365]
	   int	   tm_isdt    Positive if daylight savings   >=	0

     The tm structure is used by various common	library	routines such as
     mktime(3),	localtime(3), and strptime(3).	All fields described above are
     defined in	the IEEE Std 1003.1-2008 ("POSIX.1") standard.

   NetBSD Extensions
     In	addition, the following	NetBSD-specific	fields are available:

	   Type		    Field      Represents
	   int		    tm_gmtoff  Offset from UTC in seconds
	   __aconst char    tm_zone    Timezone	abbreviation

     The tm_zone and tm_gmtoff fields exist, and are filled in by applicable
     library routines, only if arrangements to do so were made when the	li-
     brary containing these functions was created.  There is no	guarantee that
     these fields will continue	to exist in this form in future	releases of
     NetBSD.

     The tm_gmtoff field denotes the offset (in	seconds) of the	time repre-
     sented from UTC, with positive values indicating east of the Prime	Merid-
     ian.  The tm_zone field will become invalid and point to freed storage if
     the corresponding struct tm was returned by localtime_rz(3) and the const
     timezone_t	tz argument has	been freed by tzfree(3).

SEE ALSO
     asctime(3), offtime(3), timeval(3), wcsftime(3)

STANDARDS
     The tm structure conforms to IEEE Std 1003.1-2008 ("POSIX.1") with	re-
     spect to the described standard structure members.

BSD				April 14, 2011				   BSD

NAME | SYNOPSIS | DESCRIPTION | SEE ALSO | STANDARDS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=tm&sektion=3&manpath=NetBSD+6.0>

home | help