Opened 13 years ago

Closed 13 years ago

#8350 closed bug (fixed)

"Time settings" use wrong offset from GMT during DST

Reported by: axeld Owned by: zooey
Priority: normal Milestone: R1
Component: Kits/Locale Kit Version: R1/Development
Keywords: Cc: korli
Blocked By: Blocking:
Platform: All

Description

BTimeZone::OffsetFromGMT() returns the actual offset, not just the raw offset (ie. during daylight saving time, it will return the CEST value for Germany).

This is then stored in the "Time settings" file, and DST is later computed on top of it, see http://cgit.haiku-os.org/haiku/tree/src/kits/locale/MutableLocaleRoster.cpp#n695

Change History (4)

comment:1 by zooey, 13 years ago

Sorry, I really tried, but I can't quite follow ...

Where is DST computed on top of the value that's written into the settings file?

What bad effect have you actually noticed?

comment:2 by korli, 13 years ago

Cc: korli added

comment:3 by axeld, 13 years ago

Sorry, I had thought you'd know at once what I was babbling about :-)

When I set Germany as a timezone, the "Time settings" file contains the effective offset in seconds of when I set it. When I set "Germany" during DST, the offset is 7200, when I set it in the winter it's 3600. This offset doesn't change anymore then, which means it's obviously wrong half of the year.

Anyway, with the 7200 as offset, the time was always an hour off, even when I set the hardware clock to local time. IIRC the time was also one hour off during DST. I don't know where the time is computed, but for this bug, AFAIK it only matters to write the correct offset into the archived message. I hope this actually helps, as I am a bit tired right now :-)

comment:4 by zooey, 13 years ago

Resolution: fixed
Status: newclosed

You're right - the fixed offset didn't make sense, and it isn't even necessary to store the offset at all, as clockconfig can easily just ask the configured timezone for its current offset. Should be fixed in hrev43793.

However, I'm not quite sure that this cures the off-by-one-hour problem you've seen. Please reopen if that problem is still there.

Note: See TracTickets for help on using tickets.