-
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
So how do I use this thing? #1
Comments
The day of reckoning has come. Guess I better get this package in shape. Honestly I haven't touched it since I moved it out of the |
+1 I have to handle a large high frequency data project and I can be a good beta tester of the implementation of |
The danger of writing code is that someone might actually try to use it. ;-) |
@quinnj – would be great to have some docs for this; I'm finding myself need it. Let me know if there's anything I can do to help. |
Alright, alright, I'll do it :) Thankfully most of the dirty work is done and it's mainly designing the interface. You should at least be able to do Pkg.clone("https://github.com/quinnj/TimeZones.jl")
Pkg.build("TimeZones") as of now. I'll open up another issue where peeps can chime in on desired interface (we're starting from scratch here, so I'd appreciate any input). |
Any progress on this issue? It'd be great to be able to use this package. I am working on a project that badly needs timezoned datetime and if it does not work yet in Julia, I need to fall back to R. I just tried the Warsaw example and it is broken: warsaw = TimeZone("Europe/Warsaw") LoadError: Unknown timezone Europe/Warsaw in call at /Users/szf/.julia/v0.4/TimeZones/src/TimeZones.jl:33 Any suggestion is welcome as to how to get it running. |
What's the output of running Pkg.clone("https://github.com/quinnj/TimeZones.jl")
Pkg.build("TimeZones") ? |
Pkg.clone("https://github.com/quinnj/TimeZones.jl") INFO: Cloning TimeZones from https://github.com/quinnj/TimeZones.jl Pkg.build("TimeZones")
LoadError: MethodError: ================================[ BUILD ERRORS ]================================ WARNING: TimeZones had build errors.
|
@omus, do we need a fix in TimeZones after JuliaLang/julia#12799 was merged? |
And I am using Julia v0.4, but the package is only for the 0.4 version anyway, right? |
I believe so yes. Are you using a very recent 0.4 master? Like, compiled within the last week? We just merged some changes to 0.4 master that will make TimeZones a little better to work with and I think it may have broken the package here. |
Yes, I downloaded and installed v0.4 a few days ago. |
For completeness: using TimeZones gives these warnings WARNING: module TimeZones should explicitly import == from Base which is a bit scary. |
@szalmaf if you want to use the package right now you can do |
@omus OK, I just tried the Pkg.checkout("TimeZones", "parsing") INFO: Checking out TimeZones parsing... Pkg.build("TimeZones") INFO: Building TimeZones LoadError: MethodError: ================================[ BUILD ERRORS ]================================ WARNING: TimeZones had build errors.
|
@szalmaf can you let me know the output of |
Julia Version 0.4.0-pre+7105 |
@szalmaf I'm having difficulties reproducing the error you are getting. Can you run |
LoadError: MethodError: in call at essentials.jl:58 |
Thanks. Ok it appears you are still running the old version of the package. Try running |
After doing
the
gives
Is this 0.0.1+ the right version? Also, I didn't build it this time. Should I? |
@szalmaf that is the right version. You should be able to run |
still produces this: INFO: Building TimeZones LoadError: MethodError: ================================[ BUILD ERRORS ]================================ WARNING: TimeZones had build errors.
|
I'll just get this new release out. This is strange as the exception you are getting would be from running an older version of the code. |
I restarted the 0.4 kernel in Jupyter and built TimeZones again, and it seems like it helped:
INFO: Building TimeZones |
Awesome. Everything should work as intended now. I'll get this fixed today so that others don't run into the same issue. |
Great. Thanks for your help. Just a quick check: warsaw = TimeZone("Europe/Warsaw") now outputs 2014-01-01T00:00:00+01:00 |
Working as intended. Check out the README for a basic usage walkthrough. |
Wouldn't it be a good idea to have in core a DateTime constructor signature corresponding to DateTime(2014,1,1, warsaw) (also extended to h, m, s, etc.) instead of writing ZonedDateTime(DateTime(2014,1,1), warsaw)? Just a suggestion. |
There are plenty of features to be added including convenience constructors. I've updated the package to work with the Julia v0.4-pre release. The updated version of TimeZones just needs be merged into METADATA. JuliaLang/METADATA.jl#3257 |
Closing issue as basic usage has been addressed in the README. |
I have
DateTime
data which comes with extra fields indicating the time zone in offsets from UTC and whether daylight saving is on. How do I construct a timezone-awareDateTime
-like object?The text was updated successfully, but these errors were encountered: