bug-coreutils
[Top][All Lists]
Advanced

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

date calculation problem


From: Chia_HanWee
Subject: date calculation problem
Date: Fri, 29 Dec 2006 09:20:26 +0800

Hi
I have a Red Hat ES4 server. I ran the following date command on 29 
December 2006 to obtain the month number for 10 months ago.
Result should be 02 (Feb) but I got 03 (March)

$ date
Fri Dec 29 09:15:42 SGT 2006
$ date -d '10 months ago' +%m
03

$ uname -a
Linux hostname 2.6.9-34.ELsmp #1 SMP Fri Feb 24 16:54:53 EST 2006 i686 
i686 i386 GNU/Linux
$ date -d '11 months ago' +%m
01
$ rpm -q coreutils
coreutils-5.2.1-31.2

Thanks for your attention
Kenny Chia Han-Wee 
IS / FACIM
Hitachi Semiconductor Singapore Pte Ltd
Tel : 65 62607666 x6519
address@hidden
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


reply via email to

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