软件包 | 描述 |
---|---|
java.text |
提供用于处理独立于自然语言的方式处理文本、日期、数字和消息的类和接口。
|
java.util |
包含集合框架、遗留的集合类、事件模型、日期和时间的设施、国际化和各种实用工具类(一个字符串标记,一个随机数发生器,和一位阵列)。
|
javax.xml.datatype |
XML / java类型映射。
|
Modifier and Type | Method and Description |
---|---|
TimeZone |
DateFormat.getTimeZone()
获取时区。
|
Modifier and Type | Method and Description |
---|---|
void |
DateFormat.setTimeZone(TimeZone zone)
设置此对象
DateFormat 日历的时区。
|
Modifier and Type | Class and Description |
---|---|
class |
SimpleTimeZone
SimpleTimeZone 是
TimeZone 表示使用一个时区与公历的一个具体的子类。
|
Modifier and Type | Method and Description |
---|---|
static TimeZone |
TimeZone.getDefault()
获取java虚拟机默认的
TimeZone 。
|
TimeZone |
Calendar.getTimeZone()
获取时区。
|
TimeZone |
GregorianCalendar.getTimeZone() |
static TimeZone |
TimeZone.getTimeZone(String ID)
获取给定ID的
TimeZone
|
static TimeZone |
TimeZone.getTimeZone(ZoneId zoneId)
获取给定
zoneId 的
TimeZone 。
|
Modifier and Type | Method and Description |
---|---|
static Calendar |
Calendar.getInstance(TimeZone zone)
获取使用指定的时区和默认区域设置的日历。
|
static Calendar |
Calendar.getInstance(TimeZone zone, Locale aLocale)
获取指定的时区和区域设置的日历。
|
boolean |
SimpleTimeZone.hasSameRules(TimeZone other)
返回
true 如果该区域具有相同的规则和抵消另一区。
|
boolean |
TimeZone.hasSameRules(TimeZone other)
如果此区域具有相同的规则和偏移量作为另一个区域,则返回真。
|
static void |
TimeZone.setDefault(TimeZone zone)
集
TimeZone 是由
getDefault 方法返回。
|
void |
Calendar.setTimeZone(TimeZone value)
用给定的时区值设置时区。
|
Calendar.Builder |
Calendar.Builder.setTimeZone(TimeZone zone)
设置为给定
zone 时区参数。
|
void |
GregorianCalendar.setTimeZone(TimeZone zone) |
Constructor and Description |
---|
Calendar(TimeZone zone, Locale aLocale)
用指定的时区和区域设置构造一个日历。
|
GregorianCalendar(TimeZone zone)
构建了一个
GregorianCalendar 基于默认
FORMAT 现场在特定时区的当前时间。
|
GregorianCalendar(TimeZone zone, Locale aLocale)
构建了一个
GregorianCalendar 基于给定区域在特定时区的当前时间。
|
Modifier and Type | Method and Description |
---|---|
abstract TimeZone |
XMLGregorianCalendar.getTimeZone(int defaultZoneoffset)
返回该类
java.util.TimeZone 。
|
Modifier and Type | Method and Description |
---|---|
abstract GregorianCalendar |
XMLGregorianCalendar.toGregorianCalendar(TimeZone timezone, Locale aLocale, XMLGregorianCalendar defaults)
把这
XMLGregorianCalendar 随着提供的参数为
GregorianCalendar 实例。
|
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.