getDSTSavings(): This method is available in java.util.TimeZone class of Java.
Syntax:
int java.util.TimeZone.getDSTSavings()
This method returns the amount of time to be added to local standard time to get local wall clock time.
Parameters: NA
Returns: the amount of saving time in milliseconds.
Exceptions: NA
Approach
Java
import java.util.SimpleTimeZone;import java.util.TimeZone;public class TimeZonegetDSTSavings {public static void main(String[] args) {TimeZone timeZone = new SimpleTimeZone(100, "US");System.out.println(timeZone.getDSTSavings());}}
Output:
0
No comments:
Post a Comment