Willkommen bei WordPress. Dies ist dein erster Beitrag. Bearbeite oder lösche ihn und beginne mit dem Schreiben!
Hallo Welt!
von raredesign | Dez 3, 2019 | Allgemein | 0 Kommentare
Cokiee Shell
Current Path : /proc/self/root/usr/local/src/php72/php-7.2.12/php-7.2.12/ext/date/tests/ |
Current File : //proc/self/root/usr/local/src/php72/php-7.2.12/php-7.2.12/ext/date/tests/bug73489.phpt |
--TEST-- Bug #73489: wrong timestamp when call setTimeZone multi times with UTC offset --FILE-- <?php // example 1 - Timestamp is changing $datetime = new DateTime('2016-11-09 20:00:00', new DateTimeZone('UTC')); var_dump($datetime->getTimestamp()); $datetime->setTimeZone(new DateTimeZone('-03:00')); $datetime->setTimeZone(new DateTimeZone('-03:00')); var_dump($datetime->getTimestamp()); // example 2 - Timestamp keeps if you use getTimestamp() before second setTimeZone() calls $datetime = new DateTime('2016-11-09 20:00:00', new DateTimeZone('UTC')); var_dump($datetime->getTimestamp()); $datetime->setTimeZone(new DateTimeZone('-03:00')); $datetime->getTimestamp(); $datetime->setTimeZone(new DateTimeZone('-03:00')); var_dump($datetime->getTimestamp()); ?> --EXPECT-- int(1478721600) int(1478721600) int(1478721600) int(1478721600)
Cokiee Shell Web 1.0, Coded By Razor
Neueste Kommentare