correcting a date with a time-zone field

From: Date: Thu, 10 Apr 2003 13:44:54 +0000
Subject: correcting a date with a time-zone field
Groups: php.general 
Request: Send a blank email to php-general+get-143328@lists.php.net to get a copy of this message
I have two fields in a MySQL db, one is date-time and one is time zone, in th following format: 2003-04-10 13:08:28 +0200 Time zones can be anywhere from +1000 to -1000 I need to find a way to add that time zone field to the date field to get a proper GMT time : 2003-04-10 15:08:28 The time zone field can contain other stuff, like (PDT) but they always start with ([+-])(\d{2}) Once I have that, I'll need to substract 2 hours to get the right time relative to our own time zone. Any ideas on how to achieve this ? j.

« previous php.general (#143328) next »