URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=16214>
Summary: 'date -d' missets the hour using certain syntax Project: GNU Core Utilities Submitted by: dman Submitted on: Wed 03/29/06 at 14:13 Category: None Severity: 3 - Normal Item Group: None Status: None Privacy: Public Assigned to: None Open/Closed: Open _______________________________________________________ Details: Two examples of valid syntax for date follows: date -d "12:00 1 year ago" date -d "12:00 a year ago" The 'date' command acts as if it understands the indefinite article 'a' in this case. However, the time returned is off by one hour. Sample output: bash-3.00$ date --version | head -1 date (GNU sh-utils) 2.0 bash-3.00$ TZ=UTC bash-3.00$ date -d "12:00 1 year ago" Tue Mar 29 12:00:00 UTC 2005 bash-3.00$ date -d "12:00 a year ago" Tue Mar 29 13:00:00 UTC 2005 bash-3.00$ date -d "12:00 a month ago" Wed Mar 1 13:00:00 UTC 2006 bash-3.00$ date -d "12:00 next month" Sat Apr 29 12:00:00 UTC 2006 bash-3.00$ date -d "12:00 a month ago next month" # today Wed Mar 29 13:00:00 UTC 2006 -- Dallman Ross _______________________________________________________ Carbon-Copy List: CC Address | Comment ------------------------------------+----------------------------- [EMAIL PROTECTED] | _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=16214> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils