Skip to content

Commit

Permalink
checking warning message of new timezone tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-Barth committed Feb 19, 2020
1 parent 4236a50 commit 736152e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions test/test_time.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Test
using CFTime
using Dates
using Test

# reference value from Meeus, Jean (1998)
# launch of Sputnik 1
Expand Down Expand Up @@ -434,11 +435,15 @@ data2 = CFTime.timeencode(dt,"days since 2000-01-01 00:00:00+00:00",DateTime360D
@test data == data2

data = [0,1,2,3]
dt = CFTime.timedecode(DateTime,data,"days since 2000-01-01 00:00:00+01")
dt = @test_logs (:warn,r"Time zones are currently not supported.*") begin
CFTime.timedecode(DateTime,data,"days since 2000-01-01 00:00:00+01")
end
data2 = CFTime.timeencode(dt,"days since 2000-01-01 00:00:00+00",DateTime)
@test data == data2

data = [0,1,2,3]
dt = CFTime.timedecode(DateTime360Day,data,"days since 2000-01-01 00:00:00-01:00")
dt = @test_logs (:warn,r"Time zones are currently not supported.*") begin
CFTime.timedecode(DateTime360Day,data,"days since 2000-01-01 00:00:00-01:00")
end
data2 = CFTime.timeencode(dt,"days since 2000-01-01 00:00:00+00:00",DateTime360Day)
@test data == data2

2 comments on commit 736152e

@Alexander-Barth
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/9769

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.0 -m "<description of version>" 736152eafb311ade2ca97ba3d5cf9191a8ba5a0b
git push origin v0.1.0

Please sign in to comment.