public final class TimeZoneUtil extends Object
构造器和说明 |
---|
TimeZoneUtil() |
限定符和类型 | 方法和说明 |
---|---|
static TimeZone |
getCustomerTimeZone() |
static TimeZone |
getCustomerTimeZone(Long memberId)
获取指定人员的时区
|
static int |
getDiffTimeZoneRawOffset(TimeZone timeZone)
获取系统当前默认时区与指定时区的时间差.
|
static TimeZone |
getTimeZoneByCustSet()
获取客户端登录环境的时区
|
static TimeZone |
getTimeZoneByPrivSet()
获取个人设置的首选时区
|
static String |
getTimeZoneId(String timezoneOffsetStr)
根据与utc时间的偏移分钟数,获取自定义的时区id
由于前台枚举的控制,timezoneOffsetStr 的格式为: 偏移分钟数+排序号(1位)
|
static boolean |
isEnable()
判断时区组件是否可用
|
static String |
timeZoneSettingAlert()
用户登录时,是否修改首选时区的提示
|
static void |
transCalendarToCustomer(Calendar calendar)
将Calendar转换成客户端时区对象
|
static void |
transCalendarToCustomer(Calendar calendar,
TimeZone timeZone)
将Calendar转换成指定时区对象
|
public static boolean isEnable()
public static TimeZone getCustomerTimeZone()
public static TimeZone getTimeZoneByCustSet()
public static TimeZone getTimeZoneByPrivSet()
public static int getDiffTimeZoneRawOffset(TimeZone timeZone)
timeZoneId
- 时区Idpublic static void transCalendarToCustomer(Calendar calendar, TimeZone timeZone)
calendar
- public static void transCalendarToCustomer(Calendar calendar)
calendar
- public static String getTimeZoneId(String timezoneOffsetStr)
public static String timeZoneSettingAlert()
Copyright © 2016–2018. All rights reserved.