[php-src] Issue #10297: Unknown or bad timezone (Etc/GMT+12)

From: Date: Thu, 12 Jan 2023 14:08:48 +0000
Subject: [php-src] Issue #10297: Unknown or bad timezone (Etc/GMT+12)
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-243422@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/10297
Author: abramov-ks

### Description

The following code:

```php
<?php
print_r(timezone_open('Etc/GMT+12'));
```

Resulted in this output:
PHP Warning:  timezone_open(): Unknown or bad timezone (Etc/GMT+12) in Command line code on
line 1

But I expected this output instead:
```
DateTimeZone Object
(
    [timezone_type] => 3
    [timezone] => Etc/GMT+12
)
```

### PHP Version

PHP 8.2.1

### Operating System

Ubuntu


Thread (1 message)

  • abramov-ks
« previous php.bugs (#243422) next »