Annotation of embedaddon/php/ext/date/tests/bug44742.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #44742 (timezone_offset_get() causes segmentation faults)
3: --FILE--
4: <?php
5: date_default_timezone_set('Europe/London');
6: $dates = array(
7: "2008-04-11 00:00:00+0000",
8: "2008-04-11 00:00:00+0200",
9: "2008-04-11 00:00:00+0330",
10: "2008-04-11 00:00:00-0500",
11: "2008-04-11 00:00:00-1130",
12: "2008-04-11 00:00:00 CEST",
13: "2008-04-11 00:00:00 CET",
14: "2008-04-11 00:00:00 UTC",
15: "2008-04-11 00:00:00 America/New_York",
16: "2008-04-11 00:00:00 Europe/Oslo",
17: "2008-04-11 00:00:00 Asia/Singapore",
18: );
19: foreach ($dates as $date)
20: {
21: $date = date_create($date);
22: var_dump(timezone_offset_get(date_timezone_get($date), $date));
23: }
24: ?>
25: --EXPECT--
26: int(0)
27: int(7200)
28: int(12600)
29: int(-18000)
30: int(-41400)
31: int(7200)
32: int(3600)
33: int(0)
34: int(-14400)
35: int(7200)
36: int(28800)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>