]> git.ipfire.org Git - thirdparty/util-linux.git/commit
utmpdump: use always UTC-0 timezone in textual output
authorSami Kerola <kerolasa@iki.fi>
Sun, 15 May 2016 08:50:40 +0000 (09:50 +0100)
committerSami Kerola <kerolasa@iki.fi>
Sun, 26 Jun 2016 20:58:18 +0000 (21:58 +0100)
commit3749bdcecfb799619555de2eff9636cb93509eb5
treeac4b802638bd3e0e449262f03b15107d8e8f4c2a
parentac681a310c32319423297544833932f4d689a7a2
utmpdump: use always UTC-0 timezone in textual output

Converting a time structure from text format that has timezone markup is
practically impossible.  See reference links for more information.  This
leads to situation where multiple utmpdump(1) conversions from binary to
text and back make timestamps to shift amount of timezone offset to UTC-0.

The easiest way to make multiple conversions to work without timeshifts is
to always use UTC-0 timezone.  Downside of this approach is that the textual
format is less human readable than local timestamps would be.

Reference: http://www.catb.org/esr/time-programming/#_strptime_3_and_getdate_3
Reference: http://man7.org/linux/man-pages/man3/strptime.3.html
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
login-utils/utmpdump.c