File tree Expand file tree Collapse file tree 3 files changed +3
-2
lines changed
Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,7 @@ class TimeZoneTest {
111111 Pair (" Europe/Paris" , " Europe/Paris" ),
112112 Pair (" Europe/Berlin" , " Europe/Berlin" ),
113113 Pair (" Z" , " Z" ),
114+ Pair (" z" , " Z" ),
114115 Pair (" UTC" , " UTC" ),
115116 Pair (" UTC+01:00" , " UTC+01:00" ),
116117 Pair (" GMT+01:00" , " GMT+01:00" ),
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ public actual open class TimeZone internal constructor() {
3232 if (zoneId == " UTC" ) {
3333 return UTC
3434 }
35- if (zoneId == " Z" ) {
35+ if (zoneId == " Z" || zoneId == " z " ) {
3636 return UtcOffset .ZERO .asTimeZone()
3737 }
3838 if (zoneId == " SYSTEM" ) {
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ public actual open class TimeZone internal constructor(internal val zoneId: Zone
3636 FixedOffsetTimeZone (UtcOffset .ZERO , ZoneId .of(" UTC" ))
3737
3838 public actual fun of (zoneId : String ): TimeZone = try {
39- ofZone(ZoneId .of(zoneId))
39+ ofZone(ZoneId .of(if (zoneId == " z " ) " Z " else zoneId))
4040 } catch (e: Exception ) {
4141 if (e is DateTimeException ) throw IllegalTimeZoneException (e)
4242 throw e
You can’t perform that action at this time.
0 commit comments