1--TEST--
2Test DateTime::getOffset() function : basic functionality
3--FILE--
4<?php
5//Set the default time zone
6date_default_timezone_set('Europe/London');
7
8echo "*** Testing DateTime::getOffset() : basic functionality ***\n";
9
10$winter = new DateTime('2008-12-25 14:25:41');
11$summer = new DateTime('2008-07-02 14:25:41');
12
13echo "Winter offset: " . $winter->getOffset() / 3600 . " hours\n";
14echo "Summer offset: " . $summer->getOffset() / 3600 . " hours\n";
15
16?>
17--EXPECT--
18*** Testing DateTime::getOffset() : basic functionality ***
19Winter offset: 0 hours
20Summer offset: 1 hours
21