Author: merdier
Description:
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]);
Version: 1.7.x
Severity: normal
OS: Linux
Platform: PC