projects
/
squirrelmail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added missing ';' in ISO-8859-1
[squirrelmail.git]
/
functions
/
date.php
diff --git
a/functions/date.php
b/functions/date.php
index 6dfc4ba1b7c4af1a1f524f842d5ec8e0abf948e4..6cb4b68ccc9b74cc57bf5bff2c0e62247cc1908c 100644
(file)
--- a/
functions/date.php
+++ b/
functions/date.php
@@
-13,6
+13,7
@@
// corrects a time stamp to be the local time
function getGMTSeconds($stamp, $gmt) {
// 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"))
if (($gmt == "Pacific") || ($gmt == "PST"))
$gmt = "-0800";
else if (($gmt == "EDT"))
@@
-58,6
+59,8
@@
/** now find what the server is at **/
$current = date("Z", time());
/** 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;
$stamp = (int)$stamp - (int)$gmt + (int)$current;
return $stamp;
@@
-68,8
+71,12
@@
}
function getDateString($stamp) {
}
function getDateString($stamp) {
+ global $invert_time;
$now = 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
if ($midnight < $stamp) {
// Today