Code example for TimeZone

Methods: getDSTSavingsgetRawOffset

0
     * @return					Formatted offset. 
     */ 
    public static String formatOffset(TimeZone zone) {
    	String fmt = "";
    	 
    	int base = zone.getRawOffset();
    	fmt += "UTC" + intervalMsToHmsShort(base);
    	 
    	int dst = zone.getDSTSavings();
    	if (dst != 0)
        	fmt += " (UTC" + intervalMsToHmsShort(base + dst) + ")";
    	 
    	return fmt;
    } 
 
     
    /** 
     * Produce a string describing the offset of the given time zone from 
     * UTC, including the DST offset if there is one. 
     *