xref: /PHP-8.2/ext/date/tests/gh11281.phpt (revision f9117eb8)
1--TEST--
2GH-11281 (DateTimeZone::getName() does not include seconds in offset)
3--FILE--
4<?php
5$tz = new DateTimeZone('+03:00');
6echo $tz->getName(), "\n";
7$tz = new DateTimeZone('+03:00:00');
8echo $tz->getName(), "\n";
9$tz = new DateTimeZone('-03:00:00');
10echo $tz->getName(), "\n";
11$tz = new DateTimeZone('+03:00:01');
12echo $tz->getName(), "\n";
13$tz = new DateTimeZone('-03:00:01');
14echo $tz->getName(), "\n";
15$tz = new DateTimeZone('+03:00:58');
16echo $tz->getName(), "\n";
17$tz = new DateTimeZone('-03:00:58');
18echo $tz->getName(), "\n";
19$tz = new DateTimeZone('+03:00:59');
20echo $tz->getName(), "\n";
21$tz = new DateTimeZone('-03:00:59');
22echo $tz->getName(), "\n";
23?>
24--EXPECT--
25+03:00
26+03:00
27-03:00
28+03:00:01
29-03:00:01
30+03:00:58
31-03:00:58
32+03:00:59
33-03:00:59
34