⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 timezone.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the ID of this time zone.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/TimeZone.html#getOffset(int, int, int, int, int, int)">getOffset</A></B>(int&nbsp;era,          int&nbsp;year,          int&nbsp;month,          int&nbsp;day,          int&nbsp;dayOfWeek,          int&nbsp;milliseconds)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the time zone offset, for current date, modified in case of daylight savings.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/TimeZone.html#getRawOffset()">getRawOffset</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets unmodified offset, NOT modified in case of daylight savings.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../java/util/TimeZone.html">TimeZone</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/TimeZone.html#getTimeZone(java.lang.String)">getTimeZone</A></B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;ID)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the <code>TimeZone</code> for the given ID.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/TimeZone.html#hasSameRules(java.util.TimeZone)">hasSameRules</A></B>(<A HREF="../../java/util/TimeZone.html">TimeZone</A>&nbsp;other)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if this zone has the same rule and offset as another zone.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/TimeZone.html#inDaylightTime(java.util.Date)">inDaylightTime</A></B>(<A HREF="../../java/util/Date.html">Date</A>&nbsp;date)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Queries if the given date is in daylight savings time in this time zone.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/TimeZone.html#setDefault(java.util.TimeZone)">setDefault</A></B>(<A HREF="../../java/util/TimeZone.html">TimeZone</A>&nbsp;zone)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the <code>TimeZone</code> that is returned by the <code>getDefault</code> method.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/TimeZone.html#setID(java.lang.String)">setID</A></B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;ID)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the time zone ID.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/TimeZone.html#setRawOffset(int)">setRawOffset</A></B>(int&nbsp;offsetMillis)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the base time zone offset to GMT.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/TimeZone.html#useDaylightTime()">useDaylightTime</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Queries if this time zone uses daylight savings time.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="../../java/lang/Object.html">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="../../java/lang/Object.html#finalize()">finalize</A>, <A HREF="../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../java/lang/Object.html#toString()">toString</A>, <A HREF="../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="SHORT"><!-- --></A><H3>SHORT</H3><PRE>public static final int <B>SHORT</B></PRE><DL><DD>A style specifier for <code>getDisplayName()</code> indicating a short name, such as "PST."<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/util/TimeZone.html#LONG"><CODE>LONG</CODE></A><DT><B>Since: </B><DD>1.2</DD></DL></DD></DL><HR><A NAME="LONG"><!-- --></A><H3>LONG</H3><PRE>public static final int <B>LONG</B></PRE><DL><DD>A style specifier for <code>getDisplayName()</code> indicating a long name, such as "Pacific Standard Time."<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/util/TimeZone.html#SHORT"><CODE>SHORT</CODE></A><DT><B>Since: </B><DD>1.2</DD></DL></DD></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="TimeZone()"><!-- --></A><H3>TimeZone</H3><PRE>public <B>TimeZone</B>()</PRE><DL><DD>Sole constructor.  (For invocation by subclass constructors, typically implicit.)</DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getOffset(int, int, int, int, int, int)"><!-- --></A><H3>getOffset</H3><PRE>public abstract int <B>getOffset</B>(int&nbsp;era,                              int&nbsp;year,                              int&nbsp;month,                              int&nbsp;day,                              int&nbsp;dayOfWeek,                              int&nbsp;milliseconds)</PRE><DL><DD>Gets the time zone offset, for current date, modified in case of daylight savings. This is the offset to add *to* UTC to get local time.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>era</CODE> - the era of the given date.<DD><CODE>year</CODE> - the year in the given date.<DD><CODE>month</CODE> - the month in the given date. Month is 0-based. e.g., 0 for January.<DD><CODE>day</CODE> - the day-in-month of the given date.<DD><CODE>dayOfWeek</CODE> - the day-of-week of the given date.<DD><CODE>milliseconds</CODE> - the millis in day in <em>standard</em> local time.<DT><B>Returns:</B><DD>the offset to add *to* GMT to get local time.</DL></DD></DL><HR><A NAME="setRawOffset(int)"><!-- --></A><H3>setRawOffset</H3><PRE>public abstract void <B>setRawOffset</B>(int&nbsp;offsetMillis)</PRE><DL><DD>Sets the base time zone offset to GMT. This is the offset to add *to* UTC to get local time.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>offsetMillis</CODE> - the given base time zone offset to GMT.</DL></DD></DL><HR><A NAME="getRawOffset()"><!-- --></A><H3>getRawOffset</H3><PRE>public abstract int <B>getRawOffset</B>()</PRE><DL><DD>Gets unmodified offset, NOT modified in case of daylight savings. This is the offset to add *to* UTC to get local time.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the unmodified offset to add *to* UTC to get local time.</DL></DD></DL><HR><A NAME="getID()"><!-- --></A><H3>getID</H3><PRE>public <A HREF="../../java/lang/String.html">String</A> <B>getID</B>()</PRE><DL><DD>Gets the ID of this time zone.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the ID of this time zone.</DL></DD></DL><HR><A NAME="setID(java.lang.String)"><!-- --></A><H3>setID</H3><PRE>public void <B>setID</B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;ID)</PRE><DL><DD>Sets the time zone ID. This does not change any other data in the time zone object.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>ID</CODE> - the new time zone ID.</DL></DD></DL><HR><A NAME="getDisplayName()"><!-- --></A><H3>getDisplayName</H3><PRE>public final <A HREF="../../java/lang/String.html">String</A> <B>getDisplayName</B>()</PRE><DL><DD>Returns a name of this time zone suitable for presentation to the user in the default locale. This method returns the long name, not including daylight savings. If the display name is not available for the locale, then this method returns a string in the format <code>GMT[+-]hh:mm</code>.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the human-readable name of this time zone in the default locale.<DT><B>Since: </B><DD>1.2</DD></DL></DD></DL><HR>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -