DST daylight saving expected results

I don’t remember a time when I was awake at the time the clock changes with a smart device with me, so these questions are for those that know what should happen. When the hour moves forward that day will only have 23 hours when the hour moves back will have a 25-hour day.

a) Spring, clock changes from 2 am to 3 am. What happens if I set an alarm for 2:30 am every day, I guess the alarm will not sound because there is no 2:30 am, right?
b) Fall, clock changes from 2 am back to 1 am. If I have an alarm for 1:30 am will it sound 2 times?

Now the Calendar app on my Mac using OS 10.12.6:
a) if I try to set an event at 2 am the Sunday in spring that the hour changes to 3 am, I can’t. I press 2 and goes to 3. This is smart
b) if I try to set an event at 1:30 am the Sunday in fall that the hour changes back, I can and if I set the event for 1 hour, it displays the end time to 1:30 am (because we have 2 1:30 am times this day. But what happens if I want to set the event to the second 1:30 am and not the first?

Now Xojo:
a) when you try to select 2:30 am the Sunday the hour moves forward DateTime will set the date to 3:30 am
b) when you try to select 1:30 am the Sunday the hour moves back DateTime will set the date to the second 1:30 am and not the first. From what I read there was a difference between Mac and Windows/Linux when used Xojo.Core.Date, Mac gave the first 1:30 am date and Windows/Linux the second 1:30 am.
Right now if you want to get the first 1:30 am you can use DateTime and subtract 1-hour interval.

What do you expect when creating a DateTime in Xojo for:

  • 2:30 am the day the time moves forward? 3:30 am? error? or is it up to the programmer to handle according to what Xojo gives?
  • 1:30 am the day the time moves back? 1:30 am Standard time (second 1:30 am)? 1:30 am Daylight time (first 1:30 am)? or is it up to the programmer to check the difference with GMT and handle this special case accordingly?

Hope this is clear.

The number of seconds in the day doesn’t actually change per se. it’s the offset from GMT that changes. So you get so many seconds at GMT +/- some offset… and that offset is what changes.

Yes, the offset is what change and that’s why those 2 days, for practical purposes, last 23 hours and 25 hours.

Because the offset is changed we have 2 special cases, one where the time between 2 am and 2:59:59 doesn’t exist, as soon as the clock hit 2 am it is 3 am, not 2 am.

The other that we hit 2 am and again is 1 am, having 2 hours that start at 1 am and end at 1:59:59 am.

I just wanted to know what people expect from their apps (alarm, calendar, etc.) and Xojo.