1--TEST-- 2Test DateTimeZone::getOffset() function : basic functionality 3--FILE-- 4<?php 5echo "*** Testing DateTimeZone::getOffset() : basic functionality ***\n"; 6 7//Set the default time zone 8date_default_timezone_set("GMT"); 9 10$tz1 = new DateTimeZone("Europe/London"); 11$date = new DateTime("GMT"); 12var_dump( $tz1->getOffset($date) ); 13 14$tz2 = new DateTimeZone("America/New_York"); 15var_dump( $tz2->getOffset($date) ); 16 17$tz3 = new DateTimeZone("America/Los_Angeles"); 18var_dump( $tz3->getOffset($date) ); 19 20?> 21--EXPECTF-- 22*** Testing DateTimeZone::getOffset() : basic functionality *** 23%rint\(0\)|int\(3600\)%r 24%rint\(-18000\)|int\(-14400\)%r 25%rint\(-28800\)|int\(-25200\)%r 26