Get daylight saving
int getDSTSavings()
- Returns the amount of time to be added to local standard time to get local wall clock time.
abstract boolean inDaylightTime(Date date)
- Queries if the given date is in daylight savings time in this time zone.
abstract boolean useDaylightTime()
- Queries if this time zone uses daylight savings time.
import java.util.Date;
import java.util.TimeZone;
public class Main {
public static void main(String[] args) {
TimeZone tz = TimeZone.getTimeZone("America/New_York");
System.out.println(tz.inDaylightTime(new Date()));
}
}
The output:
false