To get offset string from offset:
<?php
function timezone_offset_string( $offset )
{
return sprintf( "%s%02d:%02d", ( $offset >= 0 ) ? '+' : '-', abs( $offset / 3600 ), abs( $offset % 3600 ) );
}
$offset = timezone_offset_get( new DateTimeZone( 'Pacific/Kiritimati' ), new DateTime() );
echo "offset: " . timezone_offset_string( $offset ) . "\n";
$offset = timezone_offset_get( new DateTimeZone( 'Pacific/Tahiti' ), new DateTime() );
echo "offset: " . timezone_offset_string( $offset ) . "\n";
?>
Output:
offset: +14:00
offset: -10:00