Definition
The date_offset_get() function returns the timezone offset.
Syntax
date_offset_get(object)
Parameters
Parameter | Description |
---|---|
object |
Required. Specifies a DateTime object returned by date_create() . |
Example
<?php
$xmas = date_create("2021-12-25", timezone_open("Europe/Berlin"));
echo date_offset_get($xmas) . " seconds.<br>";