facebook / facebook/hhvm

Zend incompatibility: DateTime timezone incorrectly set

Open
#1,777 7 comments 0 reactions 0 assignees View on GitHub
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

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.