facebook / facebook/hhvm

DateTimeZone constructor does not accept time-zone offsets

Open
#3,637 15 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.