isc_stdtime.3 revision 15a44745412679c30a6d022733925af70a38b715
Copyright (C) 2000 Internet Software Consortium.
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
$Id: isc_stdtime.3,v 1.2 2000/07/27 09:43:45 tale Exp $
.Dd Jun 30, 2000 .Dt ISC_STDTIME 3 .Os BIND9 9 .Sh NAME .Nm isc_stdtime_get .Nd get the current date and time .Sh SYNOPSIS .Fd #include <config.h> .Fd #include <sys/time.h> .Fd #include <isc/stdtime.h> .Fd #include <isc/util.h> .Ft void .Fo isc_stdtime_get .Fa "isc_stdtime_t *t" .Fc .Sh DESCRIPTION .Fn isc_stdtime_get sets .Fa t to the number of seconds since the UNIX epoch, 00:00:00 UTC, January 1, 1970. .Sh SEE ALSO .Xr gettimeofday 2 , .Xr isc_time_now 3 . .Sh BUGS A time synchronisation protocol such as NTP is needed to ensure that the kernel's concept of the current time is accurate.
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
$Id: isc_stdtime.3,v 1.2 2000/07/27 09:43:45 tale Exp $
.Dd Jun 30, 2000 .Dt ISC_STDTIME 3 .Os BIND9 9 .Sh NAME .Nm isc_stdtime_get .Nd get the current date and time .Sh SYNOPSIS .Fd #include <config.h> .Fd #include <sys/time.h> .Fd #include <isc/stdtime.h> .Fd #include <isc/util.h> .Ft void .Fo isc_stdtime_get .Fa "isc_stdtime_t *t" .Fc .Sh DESCRIPTION .Fn isc_stdtime_get sets .Fa t to the number of seconds since the UNIX epoch, 00:00:00 UTC, January 1, 1970. .Sh SEE ALSO .Xr gettimeofday 2 , .Xr isc_time_now 3 . .Sh BUGS A time synchronisation protocol such as NTP is needed to ensure that the kernel's concept of the current time is accurate.
p At 03:14:08 GMT on Tue Jan 19 2038, the number of seconds since the UNIX epoch will overflow a 32-bit signed integer. This may cause unpredictable behaviour on systems which treat these timestamps as 32-bit signed quantities. .Dv isc_stdtime_t is defined as a 32-bit unsigned quantity, which means .Fn isc_stdtime_get should be safe until some time in 2106. Applications that want maximum portability should not assume anything about the size of a .Dv isc_stdtime_t .