Skip to content

Commit

Permalink
fix: fixed an issue where test cases may fail due to different machin…
Browse files Browse the repository at this point in the history
…e time zone.
  • Loading branch information
Prodesire committed Feb 17, 2024
1 parent 3e676e6 commit 3d5fcb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ def test_time_zone():

def test_strptime():
print("Running test_strptime()")
m = Morrow.strptime("20-01-2023 15:49:10", "%d-%m-%Y %H:%M:%S", TimeZone.local())
assert_equal(str(m), "2023-01-20T15:49:10.000000+08:00")
m = Morrow.strptime("20-01-2023 15:49:10", "%d-%m-%Y %H:%M:%S", TimeZone.none())
assert_equal(str(m), "2023-01-20T15:49:10.000000+00:00")

m = Morrow.strptime("2023-10-18 15:49:10 +0800", "%Y-%m-%d %H:%M:%S %z")
assert_equal(str(m), "2023-10-18T15:49:10.000000+08:00")
Expand Down

0 comments on commit 3d5fcb8

Please sign in to comment.