mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-23 16:32:45 +00:00
Timezones are fun
This commit is contained in:
parent
fc65dda94b
commit
47a1529529
@ -327,8 +327,9 @@ class Page {
|
||||
|
||||
if ($until <= 0) return false;
|
||||
|
||||
$time = gettimeofday();
|
||||
$millis = $time["sec"] * 1000;
|
||||
$dtz = new DateTimeZone(date_default_timezone_get());
|
||||
$dt = new DateTime("now", $dtz);
|
||||
$millis = ($dt->getTimestamp() + $dt->getOffset()) * 1000;
|
||||
|
||||
if ($millis > $until) {
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user