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'));exit;
based on E1c20
Output for 7.2.0
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:53:16.002928" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:16" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:53:16.002968" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:16"
Output for 7.1.10
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:53:16.004811" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:16" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:53:16.004875" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:16"
Output for 7.1.7
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:53:16.002492" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:16" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:53:16.002524" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:16"
Output for 7.1.6
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:53:16.012737" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:16" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:53:16.012849" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:16"
Output for 7.1.5
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:53:16.011106" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:16" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:53:16.011224" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:16"
Output for 7.1.0
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:53:16.004015" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:16" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:53:16.004071" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:16"
Output for 5.6.28, 7.0.20
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:53:16.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:16" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:53:16.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:16"
Output for 7.0.6
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-21 11:57:26.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-05-21 11:57:26" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-05-21 21:57:26.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:26"
Output for 7.0.5
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-03 07:53:40.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-03 07:53:40" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-03 17:53:40.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:40"
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"
Output for 7.0.3
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-18 22:35:54.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-18 22:35:54" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-19 09:35:54.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:54"
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"
Output for 7.0.1
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-24 07:46:03.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-24 07:46:03" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-24 18:46:03.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:03"
Output for 7.0.0
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-27 08:38:58.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-27 08:38:58" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-27 19:38:58.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:58"
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"
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"
Output for 5.6.19
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-08 05:11:18.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-08 05:11:18" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-08 16:11:18.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:18"
Output for 5.6.18
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-15 14:10:01.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-15 14:10:01" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-16 01:10:01.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:01"
Output for 5.6.17
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-20 01:42:03.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-20 01:42:03" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-20 12:42:03.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:03"
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"
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"
Output for 5.6.14
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-14 16:00:48.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-14 16:00:48" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-15 02:00:48.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:48"
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"
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"
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"
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"
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"
Output for 5.6.8
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-30 05:36:28.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-30 05:36:28" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-30 15:36:28.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:28"
Output for 5.5.35
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-23 00:53:11.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-05-23 00:53:11" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-05-23 10:53:11.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:11"
Output for 5.5.34
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-11 09:10:56.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-11 09:10:56" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-11 19:10:56.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:56"
Output for 5.5.33
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-09 08:16:21.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-09 08:16:21" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-09 19:16:21.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:21"
Output for 5.5.32
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-17 18:08:47.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-03-17 18:08:47" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-18 05:08:47.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:47"
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"
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"
Output for 5.5.29
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-17 06:57:35.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-17 06:57:35" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-17 16:57:35.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:35"
Output for 5.5.28
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-21 10:29:50.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-21 10:29:50" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-21 20:29:50.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:50"
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"
Output for 5.5.26
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-26 18:23:36.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-26 18:23:36" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-27 04:23:36.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:36"
Output for 5.5.25
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-29 01:50:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-04-29 01:50:00" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-29 11:50:00.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:00"
Output for 5.5.24
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-24 08:21:43.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-05-24 08:21:43" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-05-24 18:21:43.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:43"
Output for 5.4.44 - 5.4.45
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:53:18.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:18" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:53:18.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:18"
Output for 5.4.41 - 5.4.43
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:53:19.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:19" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:53:19.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:19"
Output for 5.4.38 - 5.4.40
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:53:20.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:20" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:53:20.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:20"
Output for 5.4.34 - 5.4.37
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:53:21.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:21" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:53:21.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:21"
Output for 5.4.31 - 5.4.32
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:53:22.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:22" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:53:22.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:22"
Output for 5.4.30
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:53:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:23" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:53:23.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:23"
Output for 5.4.25 - 5.4.29
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-18 12:53:23" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:23" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(19) "2016-01-18 23:53:23" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:23"
Output for 5.3.28, 5.4.20 - 5.4.24
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-18 12:53:24" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:24" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(19) "2016-01-18 23:53:24" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:24"
Output for 5.3.25 - 5.3.27, 5.4.15 - 5.4.19
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-18 12:53:25" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:25" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(19) "2016-01-18 23:53:25" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:25"
Output for 5.3.22 - 5.3.24, 5.4.12 - 5.4.14
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-18 12:53:26" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:26" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(19) "2016-01-18 23:53:26" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:26"
Output for 5.3.29
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-18 12:53:22" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 12:53:22" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(19) "2016-01-18 23:53:22" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d H:i:s') string(19) "2016-01-18 23:53:22"