]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lib/timeutils: Require '@' prefix for seconds since the Epoch timestamp
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Wed, 7 Sep 2022 05:41:41 +0000 (08:41 +0300)
committerKarel Zak <kzak@redhat.com>
Mon, 12 Sep 2022 12:22:24 +0000 (14:22 +0200)
commitfef9b04dafd297dbb080c8ccbbcb6800184a9616
treeb754f4a3708d0136e8c91bad4c52df8df76d0264
parent80e1d850577bd2b9f3e13d1cd36f504bc15adbed
lib/timeutils: Require '@' prefix for seconds since the Epoch timestamp

Since the seconds since the Epoch is just a number it might be better to
require special prefix to indicate the intention that the user wants to
interpret the number as seconds since the Epoch.

Use the same '@' character as prefix as used by systemd.time to make it
easier to integrate in scripts intended to be used on systems with or
without systemd.

Fix also the initial support which discarded the seconds from the converted
timestamp.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
lib/timeutils.c