Code example for TimeZone

Methods: inDaylightTime

0
        return currentDateString;
    } 
 
 
    private String getTimeZone(Date date) {
        if (timezone.inDaylightTime(date)) {
            return timeZoneDST;
        } else { 
            return timeZoneNoDST;
        } 
    } 
     
     
    private String calculateTimeZoneOffset(long offset) {
        StringBuffer tz = new StringBuffer();
        if ((offset<0))  {
            tz.append("-");
            offset = -offset;
        } else { 
            tz.append("+");
        }