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

Additional tests for zdt2unix/unix2zdt #86

Merged
merged 2 commits into from
Nov 3, 2017

Conversation

spurll
Copy link
Contributor

@spurll spurll commented Aug 31, 2017

No description provided.

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)
Copy link
Member

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.

Copy link
Contributor Author

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-io
Copy link

codecov-io commented Sep 5, 2017

Codecov Report

Merging #86 into master will decrease coverage by 0.14%.
The diff coverage is n/a.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
src/tzdata/timeoffset.jl 64.28% <0%> (-4.77%) ⬇️
src/local.jl 68.75% <0%> (+0.98%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b8a8cbd...528f7a9. Read the comment docs.

@omus
Copy link
Member

omus commented Sep 5, 2017

Looks like these changes need at least Julia v0.5 to work. I'll #85 before this PR.

@omus omus self-assigned this Nov 2, 2017
@omus
Copy link
Member

omus commented Nov 3, 2017

CI failures are only on Julia 0.4. Rebasing should eliminate that.

@omus omus merged commit 73f43ca into JuliaTime:master Nov 3, 2017
@omus omus deleted the gn/test-zdt2unix branch November 3, 2017 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants