summary refs log tree commit diff stats
path: root/tests/stdlib/ttimes.nim
diff options
context:
space:
mode:
authorMiran <narimiran@disroot.org>2021-03-11 16:32:50 +0100
committerGitHub <noreply@github.com>2021-03-11 16:32:50 +0100
commite922d73dd6b74a0ea9e1588bca945662f0797a9c (patch)
tree49400a718f09064aae897b0867c90d5d5ed76c14 /tests/stdlib/ttimes.nim
parent76a3b350ce0fa587f8a6c8d95256c428b0386b4e (diff)
downloadNim-e922d73dd6b74a0ea9e1588bca945662f0797a9c.tar.gz
refs #4347, add `ZZZ` and `ZZZZ` patterns for timezone offsets without colons (#17318)
Diffstat (limited to 'tests/stdlib/ttimes.nim')
-rw-r--r--tests/stdlib/ttimes.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/stdlib/ttimes.nim b/tests/stdlib/ttimes.nim
index dc9468def..66157b91c 100644
--- a/tests/stdlib/ttimes.nim
+++ b/tests/stdlib/ttimes.nim
@@ -84,6 +84,10 @@ template runTimezoneTests() =
       "2001-01-12T08:04:05Z", 11)
   parseTest("2001-01-12T15:04:05 +07:30:59", "yyyy-MM-dd'T'HH:mm:ss zzzz",
       "2001-01-12T07:33:06Z", 11)
+  parseTest("2001-01-12T15:04:05 +0700", "yyyy-MM-dd'T'HH:mm:ss ZZZ",
+      "2001-01-12T08:04:05Z", 11)
+  parseTest("2001-01-12T15:04:05 +073059", "yyyy-MM-dd'T'HH:mm:ss ZZZZ",
+      "2001-01-12T07:33:06Z", 11)
   # Kitchen     = "3:04PM"
   parseTestTimeOnly("3:04PM", "h:mmtt", "15:04:00")