< prev index next >

src/java.base/share/classes/java/util/TimeZone.java

Print this page




 143      * a short name, such as "PST."
 144      * @see #LONG
 145      * @since 1.2
 146      */
 147     public static final int SHORT = 0;
 148 
 149     /**
 150      * A style specifier for <code>getDisplayName()</code> indicating
 151      * a long name, such as "Pacific Standard Time."
 152      * @see #SHORT
 153      * @since 1.2
 154      */
 155     public static final int LONG  = 1;
 156 
 157     // Constants used internally; unit is milliseconds
 158     private static final int ONE_MINUTE = 60*1000;
 159     private static final int ONE_HOUR   = 60*ONE_MINUTE;
 160     private static final int ONE_DAY    = 24*ONE_HOUR;
 161 
 162     // Proclaim serialization compatibility with JDK 1.1

 163     static final long serialVersionUID = 3581463369166924961L;
 164 
 165     /**
 166      * Gets the time zone offset, for current date, modified in case of
 167      * daylight savings. This is the offset to add to UTC to get local time.
 168      * <p>
 169      * This method returns a historically correct offset if an
 170      * underlying <code>TimeZone</code> implementation subclass
 171      * supports historical Daylight Saving Time schedule and GMT
 172      * offset changes.
 173      *
 174      * @param era the era of the given date.
 175      * @param year the year in the given date.
 176      * @param month the month in the given date.
 177      * Month is 0-based. e.g., 0 for January.
 178      * @param day the day-in-month of the given date.
 179      * @param dayOfWeek the day-of-week of the given date.
 180      * @param milliseconds the milliseconds in day in <em>standard</em>
 181      * local time.
 182      *




 143      * a short name, such as "PST."
 144      * @see #LONG
 145      * @since 1.2
 146      */
 147     public static final int SHORT = 0;
 148 
 149     /**
 150      * A style specifier for <code>getDisplayName()</code> indicating
 151      * a long name, such as "Pacific Standard Time."
 152      * @see #SHORT
 153      * @since 1.2
 154      */
 155     public static final int LONG  = 1;
 156 
 157     // Constants used internally; unit is milliseconds
 158     private static final int ONE_MINUTE = 60*1000;
 159     private static final int ONE_HOUR   = 60*ONE_MINUTE;
 160     private static final int ONE_DAY    = 24*ONE_HOUR;
 161 
 162     // Proclaim serialization compatibility with JDK 1.1
 163     @java.io.Serial
 164     static final long serialVersionUID = 3581463369166924961L;
 165 
 166     /**
 167      * Gets the time zone offset, for current date, modified in case of
 168      * daylight savings. This is the offset to add to UTC to get local time.
 169      * <p>
 170      * This method returns a historically correct offset if an
 171      * underlying <code>TimeZone</code> implementation subclass
 172      * supports historical Daylight Saving Time schedule and GMT
 173      * offset changes.
 174      *
 175      * @param era the era of the given date.
 176      * @param year the year in the given date.
 177      * @param month the month in the given date.
 178      * Month is 0-based. e.g., 0 for January.
 179      * @param day the day-in-month of the given date.
 180      * @param dayOfWeek the day-of-week of the given date.
 181      * @param milliseconds the milliseconds in day in <em>standard</em>
 182      * local time.
 183      *


< prev index next >