Code example for TimeZone

Methods: inDaylightTime

0
        return adjustForDST(utcOffSetTime, date);
    } 
 
    private double adjustForDST(double localMeanTime, Calendar date) {
        double localTime = localMeanTime;
        if (mTimeZone.inDaylightTime(date.getTime())) {
            localTime++;
        } 
        if (localTime > 24.0) {
            localTime = localTime - 24.0;
        } 
        return localTime;
    } 
 
    /** 
     * ****** UTILITY METHODS (Should probably go somewhere else. ***************** 
     */ 
 
    private static double getDayOfYear(Calendar date) {
        return date.get(Calendar.DAY_OF_YEAR);
    }