fix for [ 865676 ] Windows does not support dates prior to midnight (00:00:00),

This commit is contained in:
Lars Kneschke 2004-01-15 01:25:29 +00:00
parent ce2f671f89
commit 247d678ec0

View File

@ -146,7 +146,7 @@
print_debug('this->gmtnow',$this->gmtnow,'api'); print_debug('this->gmtnow',$this->gmtnow,'api');
print_debug('server time',$server_time,'api'); print_debug('server time',$server_time,'api');
print_debug('server DateTime',date('D, d M Y H:i:s',$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() function getbestguess()
@ -157,7 +157,7 @@
// If DST, add 1 hour... // If DST, add 1 hour...
// - (date('I') == 1?3600:0) // - (date('I') == 1?3600:0)
$this->gmtnow = $this->convert_rfc_to_epoch(gmdate('D, d M Y H:i:s',$server_time).' GMT'); $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) function convert_rfc_to_epoch($date_str)