facebook / facebook/hhvm

DateTime::getTimeZone() returns bad (current) timezone

Open
#5,567 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
18.7k
Forks
3.1k
Avg merge
1h 47m
Merged PRs (30d)
2

Description

``` php
$time = new DateTime('1994-11-15T06:12:31-0200');
echo $time->getTimezone()->getName(); // should be "-02:00"
```

But it returns current timezone.
Demo http://3v4l.org/6hVcc

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.