bug-coreutils
[Top][All Lists]
Advanced

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

date --utc adds 24 hours


From: Craig Lawson
Subject: date --utc adds 24 hours
Date: Sun, 26 Feb 2006 21:20:11 -0800

Bug: date --utc adds 24 hours

  # date --version
  date (coreutils) 5.2.1

(my distribution is Gentoo 2006.0)

  # date +'%z %Z'
  -0800 PST
  # date --date='2:50 am PST'
  Sun Feb 26 02:50:00 PST 2006
  # date --utc --date='2:50 am PST'
  Mon Feb 27 10:50:00 UTC 2006

PST is 8 hours ahead of UTC, so the second result should show "Feb 26".
Instead, date added 32 hours! Yet give date the full date/time, and it
works correctly:

  # date --utc --date='Sun Feb 26 02:50:00 PST 2006'
  Sun Feb 26 10:50:00 UTC 2006

Best Regards,
Craig.






reply via email to

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