timezone_open_basic1.phpt 661 B

12345678910111213141516171819202122232425262728293031
  1. --TEST--
  2. Test timezone_open() function : basic functionality
  3. --FILE--
  4. <?php
  5. echo "*** Testing timezone_open() : basic functionality ***\n";
  6. var_dump( timezone_open("GMT") );
  7. var_dump( timezone_open("Europe/London") );
  8. var_dump( timezone_open("America/Los_Angeles") );
  9. ?>
  10. --EXPECTF--
  11. *** Testing timezone_open() : basic functionality ***
  12. object(DateTimeZone)#%d (2) {
  13. ["timezone_type"]=>
  14. int(2)
  15. ["timezone"]=>
  16. string(3) "GMT"
  17. }
  18. object(DateTimeZone)#%d (2) {
  19. ["timezone_type"]=>
  20. int(3)
  21. ["timezone"]=>
  22. string(13) "Europe/London"
  23. }
  24. object(DateTimeZone)#%d (2) {
  25. ["timezone_type"]=>
  26. int(3)
  27. ["timezone"]=>
  28. string(19) "America/Los_Angeles"
  29. }