Bug 54567 DateTimeZone serialize/unserialize#208
Bug 54567 DateTimeZone serialize/unserialize#208lonnylot wants to merge 4 commits intophp:PHP-5.4from
Conversation
|
This code crashes for me: The problem seems to be in this one:
|
|
So you're absolutely right on that. Thank you for catching my mistake. Over the past month I've gotten the ABBR timezone to work correctly. I am still working on the OFFSET timezone. Currently we do not have a way to instantiate a DateTimeZone using an offset. I am playing around with creating a way to do this. If that doesn't turn out to be reasonable I think we'll have to do it w/o implementing the OFFSET timezone. |
|
Will this work with microseconds? <?php
$date = DateTime::createFromFormat('U.u', microtime(true));
var_dump(unserialize(serialize($date))->format('U.u')); |
|
Ping @derickr |
|
@lstrojny I am not sure, but this pull request has to do specifically w/ DateTimeZone objects, not DateTime objects. |
|
Looks good, but misses tests for type 1 and 2 timezone types. |
|
@lonnylot my bad :) |
|
@lonnylot could you please rebase? |
|
@lonnylot ping |
Make DateTimeZone serializable and implement __set_state
Fixed handling of unserializing types 1 and 3
Implemented Dmitrys change from df97c3a Moved the timelib_parse_tz_cor function to ext/date/lib/timelib.c
|
@lstrojny Been a tad busy :) I rebased and made a few other changes (all mentioned in the commit message). All tests passed. |
|
Any chance of this making it into 5.5? |
|
Good for reminding me, I'll merge this bug fix after the |
|
I've merged it after adding the .c parser files too, but for some odd reason I can't close this PR. |
|
Can someone close the related bug: https://bugs.php.net/bug.php?id=54567 |
|
@lonnylot Done (and for the other PR as well) :) |
Make DateTimeZone serializable and implement __set_state