Zend incompatibility: DateTime timezone incorrectly set
Open
mid-pri
php5 incompatibility
- Dominant language
- C++
- Stars
- 18.7k
- Forks
- 3.1k
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 2
Description
The timezone parameter of the `DateTime` constructor should only be used as a hint. Currently in HHVM it is stored as the actual timezone.
``` php
$tz = new DateTimeZone('Antarctica/South_Pole');
$time = new DateTime('@1301574225', $tz);
var_dump($time->getTimeZone()->getName());
```
Zend:
`string(6) "+00:00"`
HHVM:
`string(21) "Antarctica/South_Pole"`
Contributor guide
Assessment
This issue has not been assessed yet.