diff --git a/core/time/rfc3339.odin b/core/time/rfc3339.odin index a4d03789d..0a2d431b7 100644 --- a/core/time/rfc3339.odin +++ b/core/time/rfc3339.odin @@ -87,7 +87,7 @@ _rfc3339_to_components :: proc(rfc_datetime: string) -> (res: dt.DateTime, utc_o // Scan UTC offset switch rfc_datetime[count] { - case 'Z': + case 'Z', 'z': utc_offset = 0 count += 1 case '+', '-': diff --git a/tests/core/time/test_core_time.odin b/tests/core/time/test_core_time.odin index 7161cf349..1f936e4a7 100644 --- a/tests/core/time/test_core_time.odin +++ b/tests/core/time/test_core_time.odin @@ -94,6 +94,8 @@ rfc3339_tests :: []RFC3339_Test{ {"1985-04-12T23:20:50.52Z", {482196050520000000}, true, 0, 23, false}, {"1985-04-12t23:20:50.52Z", {482196050520000000}, true, 0, 23, false}, {"1985-04-12 23:20:50.52Z", {482196050520000000}, true, 0, 23, false}, + // Same, but lowercase z + {"1985-04-12 23:20:50.52z", {482196050520000000}, true, 0, 23, false}, // This represents 39 minutes and 57 seconds after the 16th hour of December 19th, 1996 with an offset of -08:00 from UTC (Pacific Standard Time). // Note that this is equivalent to 1996-12-20T00:39:57Z in UTC.