DateTimeZone constructor does not accept time-zone offsets
Open
php5 incompatibility
- Dominant language
- C++
- Stars
- 18.7k
- Forks
- 3.1k
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 2
Description
The following code:
```
new DateTimeZone('+01:00');
```
Throws the following exception:
> DateTimeZone::__construct(): Unknown or bad timezone (+01:00)
Same error for `'Z'`, which is the ISO 8601 representation for UTC.
There was a [similar PHP bug](https://bugs.php.net/bug.php?id=45528) that was fixed in PHP 5.5.10, it would be nice to fix HHVM as well.
Contributor guide
Assessment
This issue has not been assessed yet.