-
Notifications
You must be signed in to change notification settings - Fork 55
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
Additional tests for zdt2unix/unix2zdt #86
Conversation
test/conversions.jl
Outdated
zdt = ZonedDateTime(2010, 1, 2, 3, 4, 5, 999, utc) | ||
round_trip = TimeZones.unix2zdt(TimeZones.zdt2unix(Int64, zdt)) | ||
@test round_trip != zdt | ||
@test round_trip == floor(zdt, Dates.Second) |
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 needs to be floor(zdt, Dates.Second(1))
to work on Julia 0.4. Make sure to leave a note for when we drop 0.4 which will be shortly.
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.
Oh, that's very possible. I'll take a look on Monday. Thanks. (And we won't need to make a change post-0.4, in my opinion. Rounding to Second(1)
is also completely valid. The methods that take a type are for convenience and readability, but those that take a value are fine too, IMO, and provide greater flexibility. But I can add that note if you'd prefer.)
Codecov Report
@@ Coverage Diff @@
## master #86 +/- ##
==========================================
- Coverage 63.79% 63.64% -0.15%
==========================================
Files 26 26
Lines 1428 1403 -25
==========================================
- Hits 911 893 -18
+ Misses 517 510 -7
Continue to review full report at Codecov.
|
bb282f3
to
528f7a9
Compare
Looks like these changes need at least Julia v0.5 to work. I'll #85 before this PR. |
CI failures are only on Julia 0.4. Rebasing should eliminate that. |
No description provided.