Thanks Scopey, but I already have the timezones set from user preferences with this bit of code about half way down the page of inserteventphp.
session_start();
//set page timezone
if ($_SESSION['MM_UTZ'] == NULL){
$_SESSION['MM_UTZ']="UTC";}
putenv ("TZ=".$_SESSION['MM_UTZ']);
//set page timeformat
if ($_SESSION['MM_UTF'] == NULL){
$_SESSION['MM_UTF']="Y-m-d H:i:s";
}
This is fine for echos from the DB with timestamp format but my problem is getting a date into it!
i.e.
form field + JS date/time picker
date/time picker returns a formatted date in Y-m-d H:i:s.
the new datetime object needs to take this $_POST value and convert into a timestamp (numeric) string, associated with the users timezone.
This is stored in the table in numeric format.
When this is echo'd from the DB, it translates the numeric object and returns a date/time object relative to the browser.
For instance, if user 1 in GB inserts a date/time (e.g. 2008-08-31 12:00:00), the new datetime object will enter a unix date: 1220180400 (GB)
When user 2 in EST-6 echos this value, it will take into account the time difference and return a date/time value 2008-08-31 06:00:00.
My problem is getting the new datetime object intot he database (ref the insert script).
Is this any clearer?
I have a page that tests this at
http://www.freecrm.x10hosting.com/timetest.php