mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 10:41:40 +09:00
Fix forward-incompatible use of null in DateTime constructor
This commit is contained in:
parent
d3b9e8400e
commit
cc2a8597b5
1 changed files with 1 additions and 1 deletions
|
|
@ -93,7 +93,7 @@ class DateTime
|
|||
{
|
||||
if (!preg_match('/^(?:A|Europe|Indian|Pacific)/', $tzid)) continue;
|
||||
$name = str_replace('_', ' ', $tzid);
|
||||
$datetime = new \DateTime(null, new \DateTimeZone($tzid));
|
||||
$datetime = new \DateTime('now', new \DateTimeZone($tzid));
|
||||
$offset = $datetime->getOffset();
|
||||
$offset = ($offset >= 0 ? '+' : '-') . sprintf('%02d', floor(abs($offset) / 3600)) . ':' . sprintf('%02d', (abs($offset) % 3600) / 60);
|
||||
unset($datetime);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue