Re: UK BST Time Settings

Adam Tauno Williams <[email protected]> Mon, 06 Apr 2009 16:02:20 -0400
Newsgroups gmane.comp.cms.opengroupware.user
Message-ID <1239048140.6349.6.camel@linux-m3mt>
On Mon, 2009-04-06 at 19:33 +0100, Ken Smith wrote:
> Adam Tauno Williams wrote:
> {Snippage}
> Thank you for this. Its very confusing.
> I've looked at the trace created by enabling logging and its looking to 
> me as if the database actually has entries that are an hour ahead of 
> what they should be.
> My SQL is very basic. Could someone please suggest an sql statement that 
> will subtract an hour from every entry.

I recently used SQLs like:

UPDATE date_x
  SET start_date = start_date - '1 HOUR'::INTERVAL,
      object_version = object_version + 1
WHERE (start_date BETWEEN '2009-03-11' AND '2009-03-31') 
 AND (date_part('Hour', start_date) -5) != 0;

UPDATE date_x
  SET end_date = end_date - '1 HOUR'::INTERVAL,
      object_version = object_version + 1
WHERE (end_date BETWEEN '2009-03-11' AND '2009-03-31') 
  AND (date_part('Hour', end_date) -5) != 0;

 - to fix a database where the timezone/DST was incorrect.

BACKUP YOUR DATA BEFORE MAKING MANUAL DATABASE CHANGES!  

If you have one-hour-off appointments in the DST revision range
[2009-03-11' AND '2009-03-31'] created via ZideLook I'd strongly suspect
that your PC/Workstation has outdated time zone tables (i.e. Outlook
made the error).

-- 
OpenGroupware.org Users
[email protected]
http://mail.opengroupware.org/mailman/listinfo/users