s3: lib: In create_clock_itime(), use timespec_current() -> clock_gettime(CLOCK_REALT...
authorJeremy Allison <jra@samba.org>
Mon, 10 Jan 2022 17:01:09 +0000 (09:01 -0800)
committerJeremy Allison <jra@samba.org>
Mon, 10 Jan 2022 17:49:27 +0000 (17:49 +0000)
commit920611f0bc98229ac4a5ee127af7f99216075341
treeefbbeaeadbdcb744500ab90782a410b97eae5fa9
parentb5e56a30dfd33e89cfb602b1e7480e210434d600
s3: lib: In create_clock_itime(), use timespec_current() -> clock_gettime(CLOCK_REALTIME..).

CLOCK_MONOTONIC (which we previously used) is reset
when the system is rebooted.

CLOCK_REALTIME is a "wall clock" time. It's still affected by NTP
changes (for Linux we should probably use CLOCK_TAI instead
but that is Linux-specific). For most systems CLOCK_REALTIME
will be good enough.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/lib/system.c