approxidate parsing for bad time units

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

 



In telling someone what date formats git accepts, and how to verify it
understands, I noticed this weirdness:

$ export TEST_DATE_NOW=`date -u +%s --date='September 10'`;
./test-date approxidate now; for i in `seq 1 10`; do ./test-date
approxidate "$i frobbles ago"; done
now -> 2012-09-10 00:00:00 +0000
1 frobbles ago -> 2012-09-02 00:00:00 +0000
2 frobbles ago -> 2012-09-03 00:00:00 +0000
3 frobbles ago -> 2012-09-04 00:00:00 +0000
4 frobbles ago -> 2012-09-05 00:00:00 +0000
5 frobbles ago -> 2012-09-06 00:00:00 +0000
6 frobbles ago -> 2012-09-07 00:00:00 +0000
7 frobbles ago -> 2012-09-08 00:00:00 +0000
8 frobbles ago -> 2012-09-09 00:00:00 +0000
9 frobbles ago -> 2012-09-10 00:00:00 +0000
10 frobbles ago -> 2012-09-11 00:00:00 +0000

Which gets more concerning once you realize the same thing happens no
matter what fake unit of time you use... including things like "yaers"
and "moths". Perhaps approxidate could be a little stricter?

Thanks,
Jeffrey
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]