summaryrefslogtreecommitdiff
path: root/lib/util/time.c
AgeCommit message (Collapse)AuthorFilesLines
2013-02-19lib/util/time: strip a potential trailing newline in the asctime case.Michael Adam1-0/+9
If strftime() is not available, asctime() is used, and this usually appends a newline character to the result. This is not desired for timestamp(). Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2012-05-08lib/util: Map 0x7fffffffffffffffLL as 0x7fffffffffffffffLL in time conversionAndrew Bartlett1-1/+1
TIME_T_MAX is not actually INT64_MAX at the moment, so check both values and set to the magic end-of-time value. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Tue May 8 06:41:43 CEST 2012 on sn-devel-104
2011-11-03util/time: Make some functions explicitly public.Jelmer Vernooij1-3/+3
2011-09-23lib/util: move some timespec helpers from source3 to the toplevelStefan Metzmacher1-0/+117
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Fri Sep 23 00:15:31 CEST 2011 on sn-devel-104
2011-06-11s3-param Remove 'time offset' from smb.confAndrew Bartlett1-3/+1
This strange parameter is apparently very rarely used, and it seems to me that on modern networks, if clients don't have correct clocks and DST offsets, that many other things (Kerberos) start to fail pretty quickly, and time and DST tables tend to be internet delivered anyway. Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Sat Jun 11 03:54:45 CEST 2011 on sn-devel-104
2011-06-01lib/util/time.c: timeval_current_ofs_usecRusty Russell1-0/+9
Several places want "microseconds from current time", and several were simply handing "usecs" values which could be over a million. Using a helper to do this is safer and more readable. I didn't replace any obviously correct callers (ie. constants). I also renamed wait_nsec in source3/lib/util_sock.c; it's actually microseconds not nanoseconds (introduced with this code in Volker's 19b783cc Async wrapper for open_socket_out_send/recv). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-01lib/util/time.c: timeval_current_ofs_msecRusty Russell1-0/+9
Several places want "milliseconds from current time", and several were simply doing "msec * 1000" which can (and does in one place) result in a usec value over 1 a million. Using a helper to do this is safer and more readable. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-03-01lib/util/time: Merge time functions from source3/lib/time.cAndrew Bartlett1-0/+59
2010-12-22lib/util/time.c - make the "strftime" output locale independant ("%c" is not)Matthias Dieter Wallnöfer1-5/+4
So that it also works on Solaris.
2010-09-15Fix a typoVolker Lendecke1-1/+1
2010-09-14Ensure incoming timespec values correctly wrap at nsecs.Jeremy Allison1-0/+7
Jeremy.
2010-09-07lib/util: add time_mono() for monotonic time a la time()Björn Jacke1-0/+21
2010-08-31lib/util: add nsec_time_diff to calulate diffs from timespecsBjörn Jacke1-0/+9
2010-08-31lib/util: add function to query the monotonic clock with the required ↵Björn Jacke1-0/+10
fallback to the realtime clock
2010-01-07lib/util: move TIME_T_MIN/MAX defines into header fileBjörn Jacke1-14/+0
2008-12-23Fix use of "time offset" parameter, and add test to make sure I don't break ↵Jelmer Vernooij1-1/+4
it again :-)
2008-10-11Cope with changed signature of http_timestring().Jelmer Vernooij1-20/+108
2008-10-11Move lib/util from source4 to top-level libutil.Jelmer Vernooij1-0/+622
Conflicts: source4/Makefile