-
Notifications
You must be signed in to change notification settings - Fork 52
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
Implemented TimeZones Interface #3
Conversation
Compatibility required that the following issue was fixed in Julia: JuliaLang/julia#12003
Note: generate_tzinfo and generate_tzdata are now broken and need to be updated.
New types are OffsetTimeZone and DaylightSavingTimeZone. Change was introduced to keep the UTC offset and the DST offset separate.
Link entries were being considered continuation lines. This issue was noticed with parsing "Pacific/Honolulu". Code was restructured to only treat lines that start with whitespace as continuation lines. This change should now gracefully handle modifications the the TZ database.
Changes made to support all records provided by the TZ database and additionally make debugging and testing easier.
Code works but is rather messy and needs refactoring.
Important note: building the package will download TZ data files from the IANA website. The FTP source we get these files is a little flaky and ends up failing downloads once in a while. As a fix I have the build script automatically attempt to retry downloading a failed file up to 3 times. If by chance we can't download a file the build will fail causing Travis to fail. |
julia 0.3- | ||
Dates | ||
|
||
julia 0.4- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this just needs to be julia 0.4
, right @IainNZ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you'd like it to install it right now, Julia 0.4- is correct ("Julia 0.4 prerelease"). julia 0.4
means >=0.4.0
. Not really the clearest thing in the world, is it :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, that makes sense. Thanks.
This is awesome @omus; definitely a lot of great work here; thanks for picking this up and running with it. Had you already started an olsen parser of sorts or did you just have to totally revamp the one I had cobbled together? Anyway, I'm inclined to merge so that we can keep hacking on things from here, but if you'd rather wait and make tweaks, that's ok too. |
@quinnj I reworked you Olsen database parser. Originally I just did enough to get it working in Julia 0.4 but then I found a couple of bugs and realized I needed to do some refactoring to make a solid test suite. For example one of the bugs was with the old You can merge this right away. I do have some tweaks to make but they should be mostly minor at this point. |
Implemented TimeZones Interface
Implemented the full TimeZones interface. There are allot of changes so I'll point form the important changes:
ZonedDateTime
which is the timezone-aware version ofDateTime
ZonedDateTime
(see README)