File tree Expand file tree Collapse file tree 5 files changed +7
-6
lines changed Expand file tree Collapse file tree 5 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ public expect open class TimeZone {
32
32
/* *
33
33
* Returns the time zone with the fixed UTC+0 offset.
34
34
*/
35
- public val UTC : TimeZone
35
+ public val UTC : FixedOffsetTimeZone
36
36
37
37
/* *
38
38
* Returns the time zone identified by the provided [zoneId].
Original file line number Diff line number Diff line change @@ -14,8 +14,9 @@ class TimeZoneTest {
14
14
15
15
@Test
16
16
fun utc () {
17
- println (TimeZone .UTC )
18
- assertEquals(" Z" , TimeZone .UTC .id)
17
+ val utc: FixedOffsetTimeZone = TimeZone .UTC
18
+ println (utc)
19
+ assertEquals(" Z" , utc.id)
19
20
}
20
21
21
22
@Test
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ public actual open class TimeZone internal constructor(internal val zoneId: Zone
28
28
29
29
public actual companion object {
30
30
public actual fun currentSystemDefault (): TimeZone = ZoneId .systemDefault().let (::TimeZone )
31
- public actual val UTC : TimeZone = jtZoneOffset.UTC . let (:: TimeZone )
31
+ public actual val UTC : FixedOffsetTimeZone = UtcOffset ( jtZoneOffset.UTC ).asTimeZone( )
32
32
33
33
public actual fun of (zoneId : String ): TimeZone = try {
34
34
val zone = ZoneId .of(zoneId)
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ public actual open class TimeZone internal constructor(internal val zoneId: Zone
33
33
34
34
public actual companion object {
35
35
public actual fun currentSystemDefault (): TimeZone = ZoneId .systemDefault().let (::TimeZone )
36
- public actual val UTC : TimeZone = jtZoneOffset.UTC . let (:: TimeZone )
36
+ public actual val UTC : FixedOffsetTimeZone = UtcOffset ( jtZoneOffset.UTC ).asTimeZone( )
37
37
38
38
public actual fun of (zoneId : String ): TimeZone = try {
39
39
val zone = ZoneId .of(zoneId)
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ public actual open class TimeZone internal constructor(internal val value: TimeZ
21
21
22
22
public actual fun currentSystemDefault (): TimeZone = PlatformTimeZoneImpl .currentSystemDefault().let (::TimeZone )
23
23
24
- public actual val UTC : TimeZone = UtcOffset .ZERO .asTimeZone()
24
+ public actual val UTC : FixedOffsetTimeZone = UtcOffset .ZERO .asTimeZone()
25
25
26
26
// org.threeten.bp.ZoneId#of(java.lang.String)
27
27
public actual fun of (zoneId : String ): TimeZone {
You can’t perform that action at this time.
0 commit comments