From 75f4a3920e78f1e3002535271005f08a8ea52f9a Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 30 May 2009 07:03:57 +0000 Subject: [PATCH] =?UTF-8?q?"Patch=20from=20Carsten=20Wolf:=20Timesheet-Ein?= =?UTF-8?q?tr=C3=A4ge=20mit=20Uhrzeit=200:00,=20die=20in=20der=20Winterzei?= =?UTF-8?q?t=20gemacht=20wurden,=20werden=20in=20einem=20Union-Query,=20de?= =?UTF-8?q?r=20in=20der=20Sommerzeit=20stattfindet,=20dem=20falschen=20Tag?= =?UTF-8?q?=20zugeordnet.=20Vermutlich=20stimmt=20dies=20nur=20f=C3=BCr=20?= =?UTF-8?q?den=20PostgreSQL=20query=20und=20ist=20Dir=20deshalb=20bisher?= =?UTF-8?q?=20nicht=20aufgefallen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Der Patch: Ändert den PostgreSQL-spezifischen Teil des queries so um, dass er Zeitzoneninformationen berücksichtigt." --- phpgwapi/inc/class.egw_db.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpgwapi/inc/class.egw_db.inc.php b/phpgwapi/inc/class.egw_db.inc.php index d32daf7d4b..8d7ef094be 100644 --- a/phpgwapi/inc/class.egw_db.inc.php +++ b/phpgwapi/inc/class.egw_db.inc.php @@ -595,7 +595,7 @@ class egw_db */ function from_bool($val) { - return $val && $val{0} !== 'f'; // everthing other then 0 or f[alse] is returned as true + return $val && $val[0] !== 'f'; // everthing other then 0 or f[alse] is returned as true } /** @@ -1235,8 +1235,8 @@ class egw_db case 'mysql': return "FROM_UNIXTIME($expr)"; - case 'pgsql': // we use date(,0) as we store server-time - return "(timestamp '".date('Y-m-d H:i:s',0)."' + ($expr) * interval '1 sec')"; + case 'pgsql': + return "(timestamp with time zone 'epoch' + ($expr) * interval '1 sec')"; case 'mssql': // we use date(,0) as we store server-time return "DATEADD(second,($expr),'".date('Y-m-d H:i:s',0)."')";