[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] BUG: posix#string->time
From: |
Andy Bennett |
Subject: |
[Chicken-users] BUG: posix#string->time |
Date: |
Fri, 02 Nov 2012 11:18:31 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.9) Gecko/20121014 Icedove/10.0.9 |
Hi,
string->time from the posix egg doesn't seem to be able to parse
timezones with an offset greater than 12 hours from UTC:
-----
#;63> (define x (cut string->time <> "%a, %d %b %Y %H:%M:%S %z"))
#;64> (x "Fri, 02 Nov 2012 04:12:23 -1300")
#f
#;65> (x "Fri, 02 Nov 2012 04:12:23 -1200")
#(23 12 4 2 10 112 5 306 #f 43200)
#;66> (x "Fri, 02 Nov 2012 04:12:23 -1201")
#f
#;67> (x "Fri, 02 Nov 2012 04:12:23 +0000")
#(23 12 4 2 10 112 5 306 #f 0)
#;68> (x "Fri, 02 Nov 2012 04:12:23 +1200")
#(23 12 4 2 10 112 5 306 #f -43200)
#;69> (x "Fri, 02 Nov 2012 04:12:23 +1201")
#f
#;70> (x "Fri, 02 Nov 2012 04:12:23 +1300")
#f
#;71>
-----
NZ is currently +1300 so string->time cannot handle all worldwide
"current time" values.
Is this considered a bug?
Regards,
@ndy
--
address@hidden
http://www.ashurst.eu.org/
0x7EBA75FF
- [Chicken-users] BUG: posix#string->time,
Andy Bennett <=