3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $nowUtc = new \DateTime( 'now', new \DateTimeZone( 'UTC' ) ); echo '$nowUtc'.PHP_EOL; var_dump($nowUtc); $nowUtc = new \DateTime( 'now', new \DateTimeZone( 'UTC' ) ); echo '$nowUtc->format(\'Y-m-d H:i:s\')'.PHP_EOL; var_dump($nowUtc->format('Y-m-d H:i:s')); $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ); echo '$nowUtc->setTimezone( new \DateTimeZone( \'Australia/Sydney\' ) )'.PHP_EOL; var_dump($nowUtc); echo '$nowUtc->format(\'Y-m-d H:i:s\')'.PHP_EOL; var_dump($nowUtc->format('Y-m-d H:i:s')); var_dump($nowUtc->format('Y-m-d H:i:s')); var_dump($nowUtc->format('Y-m-d H:i:s'));
based on 6nVYs
Output for 7.2.0
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:53:37.005481" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:37" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:53:37.005546" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:37" string(19) "2016-01-18 23:53:37" string(19) "2016-01-18 23:53:37"
Output for 7.1.10
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:53:37.004962" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:37" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:53:37.005042" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:37" string(19) "2016-01-18 23:53:37" string(19) "2016-01-18 23:53:37"
Output for 7.1.7
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:53:37.002422" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:37" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:53:37.002454" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:37" string(19) "2016-01-18 23:53:37" string(19) "2016-01-18 23:53:37"
Output for 7.1.6
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:53:37.011098" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:37" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:53:37.011184" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:37" string(19) "2016-01-18 23:53:37" string(19) "2016-01-18 23:53:37"
Output for 7.1.5
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:53:37.010540" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:37" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:53:37.010629" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:37" string(19) "2016-01-18 23:53:37" string(19) "2016-01-18 23:53:37"
Output for 7.1.0
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:53:37.004001" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:37" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:53:37.004080" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:37" string(19) "2016-01-18 23:53:37" string(19) "2016-01-18 23:53:37"
Output for 5.6.28, 7.0.20
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:53:37.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:37" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:53:37.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:37" string(19) "2016-01-18 23:53:37" string(19) "2016-01-18 23:53:37"
Output for 7.0.6
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-21 11:57:27.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-05-21 11:57:27" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-05-21 21:57:27.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-05-21 21:57:27" string(19) "2016-05-21 21:57:27" string(19) "2016-05-21 21:57:27"
Output for 7.0.5
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-03 07:53:41.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-03 07:53:41" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-03 17:53:41.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-03 17:53:41" string(19) "2016-04-03 17:53:41" string(19) "2016-04-03 17:53:41"
Output for 7.0.4
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-10 21:01:14.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-10 21:01:14" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-11 08:01:14.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-11 08:01:14" string(19) "2016-03-11 08:01:14" string(19) "2016-03-11 08:01:14"
Output for 7.0.3
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-18 22:35:55.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-18 22:35:55" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-19 09:35:55.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-19 09:35:55" string(19) "2016-03-19 09:35:55" string(19) "2016-03-19 09:35:55"
Output for 7.0.2
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-23 04:43:38.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-23 04:43:38" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-23 15:43:38.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-23 15:43:38" string(19) "2016-03-23 15:43:38" string(19) "2016-03-23 15:43:38"
Output for 7.0.1
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-24 07:46:04.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-24 07:46:04" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-24 18:46:04.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-24 18:46:04" string(19) "2016-03-24 18:46:04" string(19) "2016-03-24 18:46:04"
Output for 7.0.0
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-27 08:38:59.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-27 08:38:59" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-27 19:38:59.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-27 19:38:59" string(19) "2016-03-27 19:38:59" string(19) "2016-03-27 19:38:59"
Output for 5.6.21
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-02 14:48:12.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-05-02 14:48:12" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-05-03 00:48:12.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-05-03 00:48:12" string(19) "2016-05-03 00:48:12" string(19) "2016-05-03 00:48:12"
Output for 5.6.20
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-10 06:56:03.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-10 06:56:03" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-10 16:56:03.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-10 16:56:03" string(19) "2016-04-10 16:56:03" string(19) "2016-04-10 16:56:03"
Output for 5.6.19
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-08 05:11:19.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-08 05:11:19" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-08 16:11:19.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-08 16:11:19" string(19) "2016-03-08 16:11:19" string(19) "2016-03-08 16:11:19"
Output for 5.6.18
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-15 14:10:02.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-15 14:10:02" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-16 01:10:02.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-16 01:10:02" string(19) "2016-03-16 01:10:02" string(19) "2016-03-16 01:10:02"
Output for 5.6.17
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-20 01:42:04.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-20 01:42:04" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-20 12:42:04.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-20 12:42:04" string(19) "2016-03-20 12:42:04" string(19) "2016-03-20 12:42:04"
Output for 5.6.16
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-28 09:28:50.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-28 09:28:50" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-28 20:28:50.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-28 20:28:50" string(19) "2016-03-28 20:28:50" string(19) "2016-03-28 20:28:50"
Output for 5.6.15
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-29 10:18:26.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-29 10:18:26" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-29 21:18:26.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-29 21:18:26" string(19) "2016-03-29 21:18:26" string(19) "2016-03-29 21:18:26"
Output for 5.6.14
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-14 16:00:49.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-14 16:00:49" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-15 02:00:49.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-15 02:00:49" string(19) "2016-04-15 02:00:49" string(19) "2016-04-15 02:00:49"
Output for 5.6.13
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-15 16:39:47.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-15 16:39:47" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-16 02:39:47.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-16 02:39:47" string(19) "2016-04-16 02:39:47" string(19) "2016-04-16 02:39:47"
Output for 5.6.12
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-20 07:10:14.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-20 07:10:14" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-20 17:10:14.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-20 17:10:14" string(19) "2016-04-20 17:10:14" string(19) "2016-04-20 17:10:14"
Output for 5.6.11
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-24 13:36:12.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-24 13:36:12" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-24 23:36:12.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-24 23:36:12" string(19) "2016-04-24 23:36:12" string(19) "2016-04-24 23:36:12"
Output for 5.6.10
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-25 15:41:58.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-25 15:41:58" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-26 01:41:58.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-26 01:41:58" string(19) "2016-04-26 01:41:58" string(19) "2016-04-26 01:41:58"
Output for 5.6.9
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-27 21:10:04.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-27 21:10:04" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-28 07:10:04.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-28 07:10:04" string(19) "2016-04-28 07:10:04" string(19) "2016-04-28 07:10:04"
Output for 5.6.8
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-30 05:36:29.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-30 05:36:29" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-30 15:36:29.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-30 15:36:29" string(19) "2016-04-30 15:36:29" string(19) "2016-04-30 15:36:29"
Output for 5.5.35
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-23 00:53:12.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-05-23 00:53:12" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-05-23 10:53:12.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-05-23 10:53:12" string(19) "2016-05-23 10:53:12" string(19) "2016-05-23 10:53:12"
Output for 5.5.34
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-11 09:10:57.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-11 09:10:57" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-11 19:10:57.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-11 19:10:57" string(19) "2016-04-11 19:10:57" string(19) "2016-04-11 19:10:57"
Output for 5.5.33
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-09 08:16:22.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-09 08:16:22" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-09 19:16:22.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-09 19:16:22" string(19) "2016-03-09 19:16:22" string(19) "2016-03-09 19:16:22"
Output for 5.5.32
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-17 18:08:48.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-17 18:08:48" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-18 05:08:48.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-18 05:08:48" string(19) "2016-03-18 05:08:48" string(19) "2016-03-18 05:08:48"
Output for 5.5.31
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-21 04:54:57.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-21 04:54:57" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-21 15:54:57.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-21 15:54:57" string(19) "2016-03-21 15:54:57" string(19) "2016-03-21 15:54:57"
Output for 5.5.30
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-01 12:09:46.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-01 12:09:46" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-01 23:09:46.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-01 23:09:46" string(19) "2016-04-01 23:09:46" string(19) "2016-04-01 23:09:46"
Output for 5.5.29
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-17 06:57:36.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-17 06:57:36" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-17 16:57:36.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-17 16:57:36" string(19) "2016-04-17 16:57:36" string(19) "2016-04-17 16:57:36"
Output for 5.5.28
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-21 10:29:51.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-21 10:29:51" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-21 20:29:51.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-21 20:29:51" string(19) "2016-04-21 20:29:51" string(19) "2016-04-21 20:29:51"
Output for 5.5.27
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-22 12:07:22.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-22 12:07:22" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-22 22:07:22.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-22 22:07:22" string(19) "2016-04-22 22:07:22" string(19) "2016-04-22 22:07:22"
Output for 5.5.26
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-26 18:23:37.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-26 18:23:37" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-27 04:23:37.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-27 04:23:37" string(19) "2016-04-27 04:23:37" string(19) "2016-04-27 04:23:37"
Output for 5.5.25
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-29 01:50:01.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-29 01:50:01" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-29 11:50:01.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-29 11:50:01" string(19) "2016-04-29 11:50:01" string(19) "2016-04-29 11:50:01"
Output for 5.5.24
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-24 08:21:44.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-05-24 08:21:44" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-05-24 18:21:44.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-05-24 18:21:44" string(19) "2016-05-24 18:21:44" string(19) "2016-05-24 18:21:44"
Output for 5.4.45
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:53:40.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:40" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:53:40.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:40" string(19) "2016-01-18 23:53:40" string(19) "2016-01-18 23:53:40"
Output for 5.4.44
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:53:41.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:41" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:53:41.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:41" string(19) "2016-01-18 23:53:41" string(19) "2016-01-18 23:53:41"
Output for 5.4.41 - 5.4.43
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:53:42.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:42" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:53:42.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:42" string(19) "2016-01-18 23:53:42" string(19) "2016-01-18 23:53:42"
Output for 5.4.40
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:53:43.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:43" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:53:43.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:43" string(19) "2016-01-18 23:53:43" string(19) "2016-01-18 23:53:43"
Output for 5.4.38 - 5.4.39
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:53:44.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:44" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:53:44.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:44" string(19) "2016-01-18 23:53:44" string(19) "2016-01-18 23:53:44"
Output for 5.4.36 - 5.4.37
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:53:45.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:45" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:53:45.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:45" string(19) "2016-01-18 23:53:45" string(19) "2016-01-18 23:53:45"
Output for 5.4.34 - 5.4.35
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:53:46.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:46" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:53:46.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:46" string(19) "2016-01-18 23:53:46" string(19) "2016-01-18 23:53:46"
Output for 5.4.31 - 5.4.32
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:53:47.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:47" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:53:47.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:47" string(19) "2016-01-18 23:53:47" string(19) "2016-01-18 23:53:47"
Output for 5.4.30
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:53:48.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:48" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:53:48.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:48" string(19) "2016-01-18 23:53:48" string(19) "2016-01-18 23:53:48"
Output for 5.4.27 - 5.4.29
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-18 12:53:48" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:48" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(19) "2016-01-18 23:53:48" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:48" string(19) "2016-01-18 23:53:48" string(19) "2016-01-18 23:53:48"
Output for 5.4.24 - 5.4.26
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-18 12:53:49" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:49" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(19) "2016-01-18 23:53:49" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:49" string(19) "2016-01-18 23:53:49" string(19) "2016-01-18 23:53:49"
Output for 5.3.28, 5.4.21 - 5.4.23
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-18 12:53:50" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:50" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(19) "2016-01-18 23:53:50" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:50" string(19) "2016-01-18 23:53:50" string(19) "2016-01-18 23:53:50"
Output for 5.4.18 - 5.4.20
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-18 12:53:51" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:51" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(19) "2016-01-18 23:53:51" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:51" string(19) "2016-01-18 23:53:51" string(19) "2016-01-18 23:53:51"
Output for 5.3.26 - 5.3.27, 5.4.15 - 5.4.17
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-18 12:53:52" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:52" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(19) "2016-01-18 23:53:52" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:52" string(19) "2016-01-18 23:53:52" string(19) "2016-01-18 23:53:52"
Output for 5.3.23 - 5.3.25, 5.4.12 - 5.4.14
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-18 12:53:53" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:53" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(19) "2016-01-18 23:53:53" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:53" string(19) "2016-01-18 23:53:53" string(19) "2016-01-18 23:53:53"
Output for 5.3.29
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-18 12:53:47" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:47" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(19) "2016-01-18 23:53:47" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:47" string(19) "2016-01-18 23:53:47" string(19) "2016-01-18 23:53:47"
Output for 5.3.22
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-18 12:53:54" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:54" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(19) "2016-01-18 23:53:54" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:54" string(19) "2016-01-18 23:53:54" string(19) "2016-01-18 23:53:54"