Having ISO8601 datetime strings like 2020-11-22T12:14:50+0100 and 2020-11-22T12:14:50+0200 (note the different timezone), is it possible to use Julia's Dates.DateTime(::DateTime, ::DateFormat) to convert this to a proper datetime by adding some wildcard characters in the DateFormat? We learn from the docs:
DateTime type is not aware of time zones (naive, in Python parlance), analogous to a LocalDateTime in Java 8. Additional time zone functionality can be added through the TimeZones.jl package, which compiles the IANA time zone database
x = ["2020-11-22T12:14:50+0100", "2020-11-22T12:14:50+0200"]
Dates.DateTime.(x) # fails
# somewhat hacky but doesn't fail.
x = replace.(x, r"\+0.+00" => "")
Dates.DateTime.(x, DateFormat("y-m-dTH:M:S"))
# 2-element Array{DateTime,1}:
# 2020-11-22T12:14:50
# 2020-11-22T12:14:50
Would be there any way to add wildcards to avoid replace?
E.g.
# not run
Dates.DateTime.(x, DateFormat("y-m-dTH:M:S+0*00"))