TimeZone | android timezone取得
publicabstractclassTimeZoneextendsObject[1]implementsSerializable[2],Cloneable[3]KnowndirectsubclassesSimpleTimeZone[4]SimpleTimeZoneisaconcretesubclassofTimeZonethatrepresentsatimezoneforusewithaGregoriancalendar. TimeZonerepresentsatimezoneoffset,andalsofiguresoutdaylightsavings.Typically,yougetaTimeZoneusinggetDefaultwhichcreatesaTimeZonebasedonthetimezonewheretheprogramisrunning.Forexample,foraprogramrunninginJapan,getDefaultcreatesaTimeZoneobjectbasedonJapaneseStandardTime.Youcanalsoget...
public abstract class TimeZone extends Object[1] implements Serializable[2], Cloneable[3]
Known direct subclasses SimpleTimeZone[4] SimpleTimeZone is a concrete subclass of TimeZone that represents a time zone for use with a Gregorian calendar.TimeZone represents a time zone offset, and also figures out daylight savings.
Typically, you get a TimeZone using getDefault which creates a TimeZone based on the time zone where the program is running. For example, for a program running in Japan, getDefault creates a TimeZone object based on Japanese Standard Time.
You can also get a TimeZone using getTimeZone along with a time zone ID. For instance, the time zone ID for the U.S. Pacific Time zone is "America/Los_Angeles". So, you can get ...