From 247d678ec0a3f70359fffd172e40442cc3d142cd Mon Sep 17 00:00:00 2001 From: Lars Kneschke Date: Thu, 15 Jan 2004 01:25:29 +0000 Subject: [PATCH] fix for [ 865676 ] Windows does not support dates prior to midnight (00:00:00), --- phpgwapi/inc/class.datetime.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/class.datetime.inc.php b/phpgwapi/inc/class.datetime.inc.php index 7085cd089a..6555c67290 100755 --- a/phpgwapi/inc/class.datetime.inc.php +++ b/phpgwapi/inc/class.datetime.inc.php @@ -146,7 +146,7 @@ print_debug('this->gmtnow',$this->gmtnow,'api'); print_debug('server time',$server_time,'api'); print_debug('server DateTime',date('D, d M Y H:i:s',$server_time),'api'); - return (int)($server_time - $this->gmtnow / 3600); + return (int)(($server_time - $this->gmtnow) / 3600); } function getbestguess() @@ -157,7 +157,7 @@ // If DST, add 1 hour... // - (date('I') == 1?3600:0) $this->gmtnow = $this->convert_rfc_to_epoch(gmdate('D, d M Y H:i:s',$server_time).' GMT'); - return (int)($server_time - $this->gmtnow / 3600); + return (int)(($server_time - $this->gmtnow) / 3600); } function convert_rfc_to_epoch($date_str)