I have a ZonedDateTime instance namely say zonedDateTime
for Europe/Berlin
which is currently observing DST of an hour.
How do i know this instance observesDaylightTime or not : boolean value programmatically?
If it is then how much dst time applied currently in seconds? in this case it is one hour for berlin
I have tried below but no luck.
zonedDateTime.getOffset.getRules.isDaylightSavings(java.time.Instant.now())
zonedDateTime.getOffset.getRules.isDaylightSavings(zonedDateTime.toInstant())
It will be great if you can answer all TimeZone and SimpleTimeZone class methods and its equivalent in java8 time package.
Note: i have not asked for class comparision, I told methods. e.g. TimeZone has getDisplayName() which is equivalent in java 8 like below
DateTimeFormatter.ofPattern("zzz").format(ZonedDateTime) // for short
DateTimeFormatter.ofPattern("zzzzz").format(ZonedDateTime) // for long
But above is good to have.