Modifier and Type | Field and Description |
---|---|
static ZoneId |
ZONE_ID_UTC
UTC 的 TimeZone
|
static TimeZone |
ZONE_UTC
UTC 的 ZoneID
|
Constructor and Description |
---|
ZoneUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
getAvailableID(int rawOffset,
TimeUnit timeUnit)
获取指定偏移量的可用时区ID,如果有多个时区匹配,使用第一个
|
static TimeZone |
getTimeZoneByOffset(int rawOffset,
TimeUnit timeUnit)
获取指定偏移量的可用时区,如果有多个时区匹配,使用第一个
|
static TimeZone |
toTimeZone(ZoneId zoneId)
|
static ZoneId |
toZoneId(TimeZone timeZone)
|
public static final TimeZone ZONE_UTC
public static final ZoneId ZONE_ID_UTC
public static TimeZone getTimeZoneByOffset(int rawOffset, TimeUnit timeUnit)
rawOffset
- 偏移量timeUnit
- 偏移量单位Copyright © 2025. All rights reserved.