Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

timezone_offset_get

Description

The timezone_offset_get of Date / Time for PHP returns the timezone offset from GMT.

Syntax

timezone_offset_get ( DateTimeZone $object , DateTimeInterface $datetime ) : int

Parameters

object

A DateTimeZone object returned by timezone_open()

datetime

DateTime that contains the date/time to compute the offset from.

Return

Returns time zone offset in seconds on success or FALSE on failure.

Examples

1

<?

$object = timezone_open("Asia/Tokyo");
$datetime = date_create("now", $object);

$return = timezone_offset_get($object, $datetime);

echo $return;

?>
32400
HomeMenu