- var_dump: documentation ( source)
- date_create: documentation ( source)
- timezone_open: documentation ( source)
- date_format: documentation ( source)
<?php
$timezone_string1 = 'America/Regina';
$timezone_string2 = 'Europe/Zurich';
$summer = '2012-06-01 00:00:00';
$winter = '2012-12-01 00:00:00';
$format = 'Y-m-d H:i:s T P e';
echo "Summer: $summer\n";
$timezone_object = timezone_open( $timezone_string1 );
$date_object_summer = date_create( $summer, $timezone_object );
var_dump( date_format( $date_object_summer, $format ) );
$timezone_object = timezone_open( $timezone_string2 );
$date_object_summer = date_create( $summer, $timezone_object );
var_dump( date_format( $date_object_summer, $format ) );
echo "\nWinter: $winter\n";
$timezone_object = timezone_open( $timezone_string1 );
$date_object_winter = date_create( $winter, $timezone_object );
var_dump( date_format( $date_object_winter, $format ) );
$timezone_object = timezone_open( $timezone_string2 );
$date_object_winter = date_create( $winter, $timezone_object );
var_dump( date_format( $date_object_winter, $format ) );