Search code examples
javagregorian-calendarjava-5

Gregorian Calendar


I faced a weird problem with day light savings. I have a java program scheduled to run on every day on 00:05 AM time, but yesterday it ran on 23:05. I am using Gregorian calendar to schedule this program in java. It has never ran on 23:05 before this unless someone manually ran it. Does anyone know if this is issue with calendar?


Solution

  • That issue is almost certainly related to the daylight savings time switch, though it is odd that it should occur around midnight since the DST switch typically happens at 2 AM.

    It's hard to say more without knowing what time zone your machine is set to and seeing your actual code.