bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#26293: GNU date program


From: Dean Gibson AE7Q
Subject: bug#26293: GNU date program
Date: Tue, 28 Mar 2017 19:26:06 -0700
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

Consider: "date -d '2017-03-28 17:12:34 + 3 hours'"

In "date (coreutils) 5.2.1 (March 2004)" it gives "Tue Mar 28 20:12:34 PDT 2017".

In "GNU coreutils 8.22 February 2016)" it gives "Tue Mar 28 08:12:34 PDT 2017".

Both servers use /etc/localtime -> /usr/share/zoneinfo/PST8PDT

If I insert "PDT" in the original string after the time, it works on both servers. Unfortunately, since the servers run in an area that is subject to daylight savings time part of the year, hard coding the 'PDT' zone in the script it was in, is not appropriate.

On both servers, "date -d '2017-03-28 17:12:34 3 hours ago'" works. Is there a "3 hours ahead"-type phrase???

I have settled on "... 21 hours ago tomorrow", which works on both servers.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]