implement zoneinfo reader

R=r
DELTA=348  (338 added, 0 deleted, 10 changed)
OCL=15648
CL=15660
This commit is contained in:
Russ Cox 2008-09-22 16:41:14 -07:00
parent 3c17ee69d9
commit c14924bcc8
3 changed files with 344 additions and 8 deletions

View file

@ -152,8 +152,8 @@ export func UTC() (t *Time, err *os.Error) {
// TODO: Should this return an error?
export func SecondsToLocalTime(sec int64) *Time {
zone, offset, ok := time.LookupTimezone(sec)
if !ok {
zone, offset, err := time.LookupTimezone(sec)
if err != nil {
return SecondsToUTC(sec)
}
t := SecondsToUTC(sec+int64(offset));