Skip to content

Commit b26bf8e

Browse files
committed
Last boundary case, I mostly promise
1 parent 1cca915 commit b26bf8e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/services/Serialization.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@ function _fixSubseconds(a)
2121
end
2222

2323
function getStandardZDTString(stringTimestamp::String)
24+
# Additional check+fix for the ultraweird "2020-08-12T12:00Z"
25+
ts = replace(stringTimestamp, r"T(\d\d):(\d\d)(Z|z|\+|-)" => s"T\1:\2:00.000\3")
26+
2427
# This is finding :59Z or :59.82-05:00 and fixing it to always have 3 subsecond digits.
2528
# Temporary fix until TimeZones.jl gets an upstream fix.
26-
return replace(stringTimestamp, r":\d\d(\.\d+)?(Z|z|\+|-)" => _fixSubseconds)
29+
return replace(ts, r":\d\d(\.\d+)?(Z|z|\+|-)" => _fixSubseconds)
2730
end
2831

2932
# Corrects any `::ZonedDateTime` fields of T in corresponding `interm::Dict` as `dateformat"yyyy-mm-ddTHH:MM:SS.ssszzz"`

0 commit comments

Comments
 (0)