1--TEST--
2Test date_offset_get() function : basic functionality
3--FILE--
4<?php
5/* Prototype  : int date_offset_get  ( DateTime $object  )
6 * Description: Returns the daylight saving time offset
7 * Source code: ext/date/php_date.c
8 * Alias to functions:  DateTime::getOffset
9 */
10
11//Set the default time zone
12date_default_timezone_set('Europe/London');
13
14echo "*** Testing date_offset_get() : basic functionality ***\n";
15
16$winter = date_create('2008-12-25 14:25:41');
17$summer = date_create('2008-07-02 14:25:41');
18
19echo "Winter offset: " . date_offset_get($winter) / 3600 . " hours\n";
20echo "Summer offset: " . date_offset_get($summer) / 3600 . " hours\n";
21
22?>
23===DONE===
24--EXPECTF--
25*** Testing date_offset_get() : basic functionality ***
26Winter offset: 0 hours
27Summer offset: 1 hours
28===DONE===
29