// corrects a time stamp to be the local time
function getGMTSeconds($stamp, $gmt) {
+ global $invert_time;
if (($gmt == "Pacific") || ($gmt == "PST"))
$gmt = "-0800";
else if (($gmt == "EDT"))
/** now find what the server is at **/
$current = date("Z", time());
+ if ($invert_time)
+ $current = - $current;
$stamp = (int)$stamp - (int)$gmt + (int)$current;
return $stamp;
}
function getDateString($stamp) {
+ global $invert_time;
$now = time();
- $midnight = $now - ($now % 86400) - 86400 - date("Z", $now);
+ $dateZ = date("Z", $now);
+ if ($invert_time)
+ $dateZ = - $dateZ;
+ $midnight = $now - ($now % 86400) - $dateZ;
if ($midnight < $stamp) {
// Today