bug-cvs
[Top][All Lists]
Advanced

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

Re: get_date returning false


From: Derek Price
Subject: Re: get_date returning false
Date: Fri, 08 Apr 2005 14:16:30 -0400
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ian Abbott wrote:

| Hi Derek,
|
| I've tried building getdate in cvs-1.12.11 and in ccvs from the
| repository.  I got the same result in both cases.
|
| If you want to try and reproduce it, you'll probably need to set
| the TZ environment variable.  Mine is set to "Europe/London", but
| if your libc doesn't understand that format, you can try
| "GMT0BST,M3.5.0,M10.5.0" or "GMT0BST" instead.
|
| Here is the result of some of my tests:
|
| $ TZ=Europe/London ./getdate Enter date, or blank line to exit.
|> 2005-4-1 GMT
| Bad format - couldn't convert.
|> 2005-3-31 GMT
| Bad format - couldn't convert.
|> 2005-3-30 GMT
| Bad format - couldn't convert.
|> 2005-4-1 BST
| 2005-04-01 00:00:00.000000000
|> $
| $ TZ=America/New_York ./getdate Enter date, or blank line to exit.
|> 2005-4-1 GMT
| 2005-03-31 19:00:00.000000000
|> 2005-4-2 GMT
| 2005-04-01 19:00:00.000000000

It looks like zones which have a summer daylight counterpart are
failing.  These same dates passed as "EST" fail, though "EDT" passes.
I assume this is what we are seeing with the successful parsing of
Ian's "BST" (British Summer Time):

$ TZ=America/New_York ./getdate >getdate-got
Enter date, or blank line to exit.
~        > 2005-3-1 EST
2005-03-01 00:00:00.000000000
~        > 2005-4-1 EST
2005-04-01 00:00:00.000000000
~        > 2005-5-1 EST
Bad format - couldn't convert.
~        > 2005-5-1 EDT
2005-05-01 00:00:00.000000000
~        > 2005-5-1 UTC0
2005-04-30 20:00:00.000000000
~        > 2005-6-1 EST
Bad format - couldn't convert.
~        > 2005-6-1 EDT
2005-06-01 00:00:00.000000000
~        > 2005-6-1 UTC0
2005-05-31 20:00:00.000000000
~        >


I've checked in a workaround on 1.12.x - I've replaced all three
remaining internal references to "GMT" in the sources with "-0000".
Let me know if this works for you, and it can be released with
1.12.12.  I don't know whether to expect a getdate fix from GNULIB
yet, but if we do, then I'll roll that in too.

Regards,

Derek
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCVsp+LD1OTBfyMaQRAnjdAKCv3DhIBSCRYoAUpgEuHdL017tkIwCgzw3d
qPT1vZNu3ergz7kD734cG+4=
=EK5D
-----END PGP SIGNATURE-----






reply via email to

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