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;
Output for 7.2.0
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:52:03.007672" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 12:52:03" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:52:03.008516" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 11:52:03"
Output for 7.1.10
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:52:03.004887" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 12:52:03" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:52:03.004953" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 11:52:03"
Output for 7.1.7
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:52:03.003665" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 12:52:03" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:52:03.003722" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 11:52:03"
Output for 7.1.6
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:52:03.007454" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 12:52:03" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:52:03.007506" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 11:52:03"
Output for 7.1.5
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:52:03.010195" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 12:52:03" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:52:03.010275" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 11:52:03"
Output for 7.1.0
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:52:03.004011" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 12:52:03" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:52:03.004067" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 11:52:03"
Output for 5.6.28, 7.0.20
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:52:03.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 12:52:03" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:52:03.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 11:52:03"
Output for 7.0.6
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-21 11:57:25.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-05-21 11:57:25" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-05-21 21:57:25.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-05-21 09:57:25"
Output for 7.0.5
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-03 07:53:39.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-04-03 07:53:39" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-03 17:53:39.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-04-03 05:53:39"
Output for 7.0.4
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-10 21:01:13.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-03-10 09:01:13" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-11 08:01:13.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:13"
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 10: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:37.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-03-23 04:43:37" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-23 15:43:37.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-03-23 03:43:37"
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 06:46:03"
Output for 7.0.0
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-27 08:38:57.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-03-27 08:38:57" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-27 19:38:57.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-03-27 07:38:57"
Output for 5.6.21
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-02 14:48:11.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-05-02 02:48:11" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-05-03 00:48:11.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-05-03 12:48:11"
Output for 5.6.20
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-10 06:56:02.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-04-10 06:56:02" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-10 16:56:02.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-04-10 04:56:02"
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 04:11:18"
Output for 5.6.18
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-15 14:10:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-03-15 02:10:00" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-16 01:10:00.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:00"
Output for 5.6.17
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-20 01:42:02.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-03-20 01:42:02" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-20 12:42:02.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:02"
Output for 5.6.16
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-28 09:28:49.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-03-28 09:28:49" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-28 20:28:49.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-03-28 08:28:49"
Output for 5.6.15
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-29 10:18:25.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-03-29 10:18:25" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-29 21:18:25.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-03-29 09:18:25"
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 04: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:46.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-04-15 04:39:46" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-16 02:39:46.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:46"
Output for 5.6.12
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-20 07:10:13.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-04-20 07:10:13" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-20 17:10:13.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-04-20 05:10:13"
Output for 5.6.11
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-24 13:36:11.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-04-24 01:36:11" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-24 23:36:11.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-04-24 11:36:11"
Output for 5.6.10
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-25 15:41:57.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-04-25 03:41:57" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-26 01:41:57.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:57"
Output for 5.6.9
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-27 21:10:03.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-04-27 09:10:03" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-28 07:10:03.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:03"
Output for 5.6.8
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-30 05:36:27.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-04-30 05:36:27" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-30 15:36:27.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-04-30 03:36:27"
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 12: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:55.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-04-11 09:10:55" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-11 19:10:55.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-04-11 07:10:55"
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 07:16:21"
Output for 5.5.32
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-17 18:08:46.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-03-17 06:08:46" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-18 05:08:46.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:46"
Output for 5.5.31
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-21 04:54:56.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-03-21 04:54:56" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-03-21 15:54:56.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-03-21 03:54:56"
Output for 5.5.30
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-01 12:09:45.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-04-01 12:09:45" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-01 23:09:45.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-04-01 11:09:45"
Output for 5.5.29
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-17 06:57:34.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-04-17 06:57:34" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-17 16:57:34.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-04-17 04:57:34"
Output for 5.5.28
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-21 10:29:49.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-04-21 10:29:49" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-21 20:29:49.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-04-21 08:29:49"
Output for 5.5.27
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-22 12:07:21.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-04-22 12:07:21" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-22 22:07:21.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-04-22 10:07:21"
Output for 5.5.26
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-26 18:23:35.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-04-26 06:23:35" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-27 04:23:35.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:35"
Output for 5.5.25
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-29 01:49:59.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-04-29 01:49:59" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-04-29 11:49:59.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-04-29 11:49:59"
Output for 5.5.24
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-24 08:21:42.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-05-24 08:21:42" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-05-24 18:21:42.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-05-24 06:21:42"
Output for 5.4.44 - 5.4.45
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:52:06.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 12:52:06" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:52:06.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 11:52:06"
Output for 5.4.41 - 5.4.43
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:52:07.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 12:52:07" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:52:07.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 11:52:07"
Output for 5.4.39 - 5.4.40
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:52:08.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 12:52:08" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:52:08.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 11:52:08"
Output for 5.4.35 - 5.4.38
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:52:09.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 12:52:09" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:52:09.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 11:52:09"
Output for 5.4.32 - 5.4.34
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:52:10.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 12:52:10" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:52:10.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 11:52:10"
Output for 5.4.30 - 5.4.31
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-18 12:52:11.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 12:52:11" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(26) "2016-01-18 23:52:11.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 11:52:11"
Output for 5.4.26 - 5.4.29
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-18 12:52:11" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 12:52:11" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(19) "2016-01-18 23:52:11" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 11:52:11"
Output for 5.3.28, 5.4.21 - 5.4.25
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-18 12:52:12" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 12:52:12" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(19) "2016-01-18 23:52:12" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 11:52:12"
Output for 5.3.27, 5.4.17 - 5.4.20
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-18 12:52:13" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 12:52:13" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(19) "2016-01-18 23:52:13" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 11:52:13"
Output for 5.3.22 - 5.3.26, 5.4.12 - 5.4.16
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-18 12:52:14" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 12:52:14" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(19) "2016-01-18 23:52:14" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 11:52:14"
Output for 5.3.29
$nowUtc object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-18 12:52:10" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 12:52:10" $nowUtc->setTimezone( new \DateTimeZone( 'Australia/Sydney' ) ) object(DateTime)#2 (3) { ["date"]=> string(19) "2016-01-18 23:52:10" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Australia/Sydney" } $nowUtc->format('Y-m-d h:i:s') string(19) "2016-01-18 11:52:10"