Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test + Fix for #68078 #1653

Closed
wants to merge 4 commits into from
Closed

Conversation

wjzijderveld
Copy link
Contributor

@derickr
Copy link
Member

derickr commented Nov 30, 2015

Looks good, but add a test for equality too please, and one for negative timestamps :-)

@wjzijderveld
Copy link
Contributor Author

@derickr I added the test for equality. But test for negative timestamps failed as there seems to be a bug in instantiating negative timestamps from format (returns false in PHP). Setting a timestamp with microseconds with setTimestamp seems impossible as well, so couldn't write a successful test :-)

@derickr
Copy link
Member

derickr commented Nov 30, 2015

php -r 'var_dump(DateTime::createFromFormat("U.u", "1.3")->modify("-5 seconds"));'

@wjzijderveld
Copy link
Contributor Author

There already is a bug report for 'U' with negative timestamps: https://bugs.php.net/bug.php?id=66836

@laruence laruence added the Bug label Dec 5, 2015
@wjzijderveld
Copy link
Contributor Author

Build keeps failing on other stuff, how do we deal with that?

@jerrygrey
Copy link

@wjzijderveld The Travis CI build failure doesn't appear to be related to your code.

TEST 13008/13019 [sapi/fpm/tests/010.phpt]
========DIFF========
016+ idle processes:       0
016- idle processes:       1
018+ total processes:      1
018- total processes:      2
========DONE========
FAIL FPM: Test status page [sapi/fpm/tests/010.phpt]

I wouldn't worry about it.

@derickr
Copy link
Member

derickr commented Jan 29, 2016

Merged, after a rebase and a fix

@derickr derickr closed this Jan 29, 2016
@wjzijderveld wjzijderveld deleted the bug68078 branch February 2, 2016 09:54
hhvm-bot pushed a commit to facebook/hhvm that referenced this pull request Sep 1, 2016
Summary:
I found this bug earlier in PHP and [fixed it there](php/php-src#1653). After that I checked if it was also in HHVM. It was, so I also tried to fix it here 😄

Depends on an updated version of [hhvm-third-party](hhvm/hhvm-third-party#102).
Closes #6888

Reviewed By: paulbiss

Differential Revision: D3034526

Pulled By: aorenste

fbshipit-source-id: 89a10c6af94002bc1992d73341ca5feeb7a2d1b2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants