hphp/test/slow/ext_datetime/date.php depends on specific tzdata version
- Dominant language
- C++
- Stars
- 18.7k
- Forks
- 3.1k
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 2
Description
### HHVM Version
HHVM 3.13.1 and newer.
### Standalone code, or other way to reproduce the problem
I tested the following code in two different versions of tzdata packages: 2015g-0ubuntu0.15.04 and 2015a-1:
``` php
date_default_timezone_set("America/Los_Angeles");
var_dump(date("T"));
var_dump(date("T", -5000000000));
```
This test produces different outputs depending on the package installed.
### Expected result
The expected result, according to the date.php's "expectation file" is:
```
string(3) "PDT"
string(3) "PST"
```
Note: this result is generated when using 2015a-1
### Actual result
```
string(3) "PDT"
string(3) "LMT"
```
Note: this result is generated when using 2015g-0ubuntu0.15.04 0
### Comments
The example presented in this issue was extracted from hphp/test/slow/ext_datetime/date.php. Currently, this test is failing on 2015g-0ubuntu0.15.04 (which is the newer version) but not in 2015a-1.
I think, there are some options to treat this issue:
- Update the test with the expected result compliant to the newest tzdata version.
- Set the CMAKE file to expect a specific tzdata version.
- Skip test if the tzdata package currently installed is different from what is expected (don't know if this is actually possible)
Contributor guide
Assessment
This issue has not been assessed yet.