Last modified: 2010-05-15 15:41:03 UTC
The date fields are created with the 'timestamptz' type under PostgreSQL so the time zone should be supported. in this case, 'wfTimestamp' (GlobalFunctions.php) can receive a date like this one : '2006-07-11 10:36:00+02'. I propose to add these lines : function wfTimestamp($outputtype=TS_UNIX,$ts=0) { $uts = 0; $da = array(); if ($ts==0) { $uts=time(); } elseif (preg_match("/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)$/D",$ts,$da)) { # TS_DB $uts=gmmktime((int)$da[4],(int)$da[5],(int)$da[6], (int)$da[2],(int)$da[3],(int)$da[1]); + } elseif (preg_match("/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)\+(\d\d)$/D",$ts,$da)) { + # TS_DBTZ + $uts=gmmktime((int)$da[4] + (int)$da[7],(int)$da[5],(int)$da[6], + (int)$da[2],(int)$da[3],(int)$da[1]);
Created attachment 2117 [details] adds postgresql time format definition
I'm not sure I fully understand the above. AFAICT the issue I have had with postgresql is that the mediawiki software attempts to operate as if the db is working in GMT, which throws off timestamps which may be at a different timezone. The attached patch implements a POSTGRES timestamp definition within mediawiki, and adjusts it accordingly. This method worked well for wikipgedia.
I think bigger error is to create date fields with timezone information. Initial PG support did use 'timestamp without timezone' everywhere.
Going to close this for now as resolved: if specific timestamp related errors come up, please reopen of open a new bug.