Description of problem: # LANG=C date Thu Jul 31 10:00:21 CEST 2008 # LANG=C date -d 'last month' Tue Jul 1 10:00:27 CEST 2008 Version-Release number of selected component (if applicable): All, F8 as well. Actual results: 30 days before today Expected results: last month, like in perl # perl -e 'use DateTime; print DateTime->now;' 2008-07-31T08:05:35 # perl -e 'use DateTime; print DateTime->now->subtract(months => 1);' 2008-06-30T08:05:38 or pgsql template1=# select now(); 2008-07-31 10:12:21.004549+02 template1=# select now() - interval '1 month'; 2008-06-30 10:12:22.249536+02 PS: I know it's not directly RH related, but I don;t know where else to post it.
Thanks for report, that fuzzy behaviour was already reported few times... However - that's not a bug, but documented behaviour which is expected. "Last month" is relative time offset which represents -1 month. For Jul 31, it substracts one month from the date - so the result should be Jun 31. That date is invalid, so it is intentionally interpreted as Jul 1. It is documented in RHEL-5 coreutils (date) info documentation, section 27.6 Relative items in date strings. Solution for scripts is also available in that documentation. Closing NOTABUG.