0

I just wanted to know if java date time library have any library which can return day light saving start and end time in a particular year and time zone. for ex:

getDSTStartdateTime(timezone, year){
   return dayLightStartDateTime
}

getDSTEnddateTime(timezone, year){
   return dayLightEndDateTime
}

I tried it with some functions but not able to get desired result. Any help is much appreciated.

Sumit Sood
  • 441
  • 7
  • 23
  • You methods seem to return a single result for a given year, however, there are usually two date-times where `DST` is applied per year. – Glains Dec 07 '20 at 07:42
  • @Glains I have two separate functions for DST start date and DST end date – Sumit Sood Dec 07 '20 at 07:44
  • Thanks for the clarification, i tought they would return the `LocalDateTime` before and after a _single_ transition. – Glains Dec 07 '20 at 07:49
  • 2
    By the way, be aware that politicians change the offset of their time zone(s) for other reasons too, not just for Daylight Saving Time. Other reasons include politics, diplomacy, war, and occupation. – Basil Bourque Dec 08 '20 at 00:34

0 Answers0