Return | Method | Summary |
---|---|---|
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
java2s.com | Contact Us | Privacy Policy |
Copyright 2009 - 12 Demo Source and Support. All rights reserved. |
All other trademarks are property of their respective owners. |