[Bug 1170780] New: Date command always gives current time zone when asked for any -d@???
http://bugzilla.novell.com/show_bug.cgi?id=1170780 Bug ID: 1170780 Summary: Date command always gives current time zone when asked for any -d@??? Classification: openSUSE Product: openSUSE Distribution Version: Leap 15.1 Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Other Assignee: screening-team-bugs@suse.de Reporter: opensuse@1.opensuse.bgcomp.co.uk QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- The date command has a number of switches, one of which is -d where you give it the number of seconds since epoch, as in "date -d@1234". This returns "Thu Jan 1 01:20:34 BST 1970" for the UK. /etc/localtime is set to /usr/share/zoneinfo/Europe/London. That's wrong, it should give "Thu Jan 1 00:20:34 1970 +0100 BST". Additionally, you can get it to return as any string you want to, as in "date -d@1234 "+%c %z %Z"" which should give "Thu Jan 1 01:20:34 1970 +0000 GMT". After all, in January, the UK is not in daylight saving time. However, what it does give you is "Thu Jan 1 01:20:34 1970 +0100 BST". It therefore gives you the current daylight saving time status, rather than that requested. I assume currently, this will give erroneous results for any requests in daylight saving. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=1170780
http://bugzilla.novell.com/show_bug.cgi?id=1170780#c1
--- Comment #1 from Bob Goddard
http://bugzilla.novell.com/show_bug.cgi?id=1170780
http://bugzilla.novell.com/show_bug.cgi?id=1170780#c2
--- Comment #2 from Bob Goddard
http://bugzilla.novell.com/show_bug.cgi?id=1170780
http://bugzilla.novell.com/show_bug.cgi?id=1170780#c3
Bob Goddard
participants (1)
-
bugzilla_noreply@novell.com