java.util.timezone,Java.util.TimeZone类

Sr.No.

Method & Description

1

Object clone()

This method creates a copy of this TimeZon

2

static String[] getAvailableIDs()

This method gets all the available IDs supported.

3

static String[] getAvailableIDs(int rawOffset)

This method gets the available IDs according to the given time zone offset in milliseconds.

4

static TimeZone getDefault()

This method gets the default TimeZone for this host.

5

String getDisplayName()

This method returns a name of this time zone suitable for presentation to the user in the default locale.

6

String getDisplayName(boolean daylight, int style)

This method returns a name of this time zone suitable for presentation to the user in the default locale.

7

String getDisplayName(boolean daylight, int style, Locale locale)

This method returns a name of this time zone suitable for presentation to the user in the specified locale.

8

String getDisplayName(Locale locale)

This method returns a name of this time zone suitable for presentation to the user in the specified locale.

9

int getDSTSavings()

This method returns the amount of time to be added to local standard time to get local wall clock time.

10

String getID()

This method gets the ID of this time zone

11

abstract int getOffset(int era, int year, int month, int day, int dayOfWeek, int milliseconds)

This method gets the time zone offset, for current date, modified in case of daylight savings.

12

int getOffset(long date)

This method returns the offset of this time zone from UTC at the specified date.

13

abstract int getRawOffset()

This method returns the amount of time in milliseconds to add to UTC to get standard time in this time zone.

14

static TimeZone getTimeZone(String ID)

This method gets the TimeZone for the given ID.

15

boolean hasSameRules(TimeZone other)

This method returns true if this zone has the same rule and offset as another zone.

16

abstract boolean inDaylightTime(Date date)

This method queries if the given date is in daylight savings time in this time zone.

17

static void setDefault(TimeZone zone)

This method sets the TimeZone that is returned by the getDefault method.

18

void setID(String ID)

This method sets the time zone ID

19

abstract void setRawOffset(int offsetMillis)

This method sets the base time zone offset to GMT.

20

abstract boolean useDaylightTime()

This method queries if this time zone uses daylight savings time.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值