[Gpe-list] GPE Calendar and changing "home city" time zone?
Graham Cobb
g+gpe at cobb.uk.net
Wed Mar 12 01:04:50 CET 2008
On Tuesday 11 March 2008 01:32:51 Fyodor wrote:
> So I opened the Clock
> application and changed the "home city" to Los Angeles. That seemed
> like an easy fix until I opened GPE-Calendar and suddenly my 1800
> events had all moved back 7 hours. Suddenly all of my 11AM meetings
> this week were showing up at 11AM.
GPE Calendar stores times in UTC, as a Unix-style integer (seconds since
0:00:00 UTC on the morning of 1 January 1970). The timezone is only used
when entering event times and when displaying them. So, if you had the TZ
set to London and entered the events as 11:00 today (say), that would be
entered into the database as 11:00 on 11th March 2008 UTC (as London is
currently on GMT, which is UTC). If you then change the TZ to LA, that same
time (11:00 UTC) will now be displayed as 04:00 on 11th March 2008.
To get the time to display as 11:00 on 11th March in LA time, you would need
to add 7 hours worth of seconds (25200 seconds) to the time value.
> I switched back to London time and everything is working again, but
> I'd rather have the proper timezone set. Is there any way to either
> set my time zone without affecting GPE-Calendar entries, or modify the
> GPE-databases to fix the problem? I installed sqlite 2 and
> investigated the calendar DB schema, but I didn't see a way to change
> what GPE seems to consider the reference time zone. And with 1800
> events, I can't just edit them all by hand.
An SQL user can probably help you come up with a command to add 25200 to all
the start and end times. One thing is that you won't want to change any
field that currently has a 0 time (if there are any, I can't remember enough
of the event handling code offhand). I suggest you take a copy of
your .gpe/calendar file before messing around with this!
Graham
More information about the Gpe-list
mailing list