Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Daylight Savings Time
How does CQC handle DST? I have shades set to go down 30 minutes after sunrise. Today, first day of DST, they went down while it was still pitch black outside. I guess that would mean that my CQC did not adjust sunrise to DST.

There must be someplace I haven't found yet that one would check to observe DST.
No, this is a known issue that just hasn't been dealt with. The scheduled event server pre-schedules the next time for an event after it is run, and puts it into a sorted list by time, so that it just has to look at the top entry's scheduled time and the current time and decide if it's time to do anything. So the one that ran today was scheduled yesterday, after it ran which was before the time change. They'll be correct again now. It only messes up the one day.

Sorry about that. It sounds like it would be easy to fix, but it's not. Anything to do with the scheduler requires careful consideration because it's so hard to really test correctly, and so tricky to get right (as is anything time related really.)
Dean Roddey
Explorans limites defectum
One day I can certainly live with. I'm glad to know that's the issue so I don't go messing with it. Sounds like a non-problem.

I suppose I'm a bit curious if there is a place in CQC to opt for DST since there are localities that don't observe it. I don't happen to be in one of them.
CQC would just use the system settings for that. It's not that CQC doesn't know about DST, since it can get that info. It's just that there would have to be a very special case scenario that only happens two days a year and that would have to be done by checking whether DST changed, at whatever time it's supposed to change in any given location. Unless there's a query to ask for the day that it's going to change.
Dean Roddey
Explorans limites defectum
I suppose what isn't clicking for me is how CQC knows it should adjust events 1 hr when they relate to sunrise/sunset, since these occurrences are arbitrarily different. By arbitrarily, I mean be local jurisdiction.

As a for instance, my computer system will adjust for DST and the correct time will be displayed by the computer. However, when the change to DST takes place, an event time to sunrise has to be offset one way or another.

A for instance: Let's say sunrise is 8:00 am during standard time. I have an event set to happen 30 minutes after sunrise, or happening at 8:30 am. Then, DST comes along and my computer clock now reads 9:00 am when the sunrise occurs. That means CQC has to make a one hour adjustment when triggering off of sunrise during DST.

So I guess my question is: does CQC internally make that adjustment so that events tied to sunrise remain properly anchored to sunrise? I'm assuming it does. The additional question would then be, is it selectable? What do the people in Arizona do, if not?
Well, sunrise/sunset calculations are based on both DST and lat/long info. Both are used when the next runtime is calculated. It's just that the next run time is calculated at the point when the current runtime has just been passed and the event queued up. At that point, it knows that the next runtime has to be in the future, so it moves forward to the next possible runtime for that type of event.

But, because it pre-calculates them, it uses todays DST to calculate a time for tomorrow. It doesn't have a way to know that tomorrow is going to be a different DST.

So it's just that pre-calculation of the next runtime that causes it. Otherwise, it would have to wake up constantly and calculate them all and see if it's time. By pre-calculating, it can just maintain a sorted list by time and knows it doesn't have to do anything until the time of the top one if the list arrives.

So it's really efficient, but without a way of knowing that tomorrow the DST is going to change, it will get it wrong for one day. I'll have to see if there's some way of asking Windows when the DST change is going to occur or something like that and keep that info around. I'm not sure if there is such a thing though. If not, then I'd have to give up on pre-calculating runtimes, which would be a really big change in how it works.
Dean Roddey
Explorans limites defectum
Dean, I don't consider that one day thing to be an issue. Perhaps someone else might have an installation that was more critical, but I don't.

My question is more one of curiousity. If I suddenly moved to Arizona where they don't observe DST, how does my new installation of CQC know not to observe it as it does in other parts of the country.
I think CQC just uses the system clock so if your computer observes dst so does CQC.
potts.mike Wrote:I think CQC just uses the system clock so if your computer observes dst so does CQC.

Yep, that would be it. The system would just never report DST being in force if DST isn't used where you are, so CQC would always think it's in a non-DST state. As long as Windows correctly understands DST for your area, CQC will as well.
Dean Roddey
Explorans limites defectum
That makes sense and answers my curiosity.

Possibly Related Threads…
Thread Author Replies Views Last Post
  Time to replace my mSata HDD. ellisr63 4 2,280 11-23-2018, 11:47 AM
Last Post: ellisr63
  Return time from UPB rtarver 9 3,631 08-01-2015, 08:34 AM
Last Post: Dean Roddey
  Turning light off after certain time royalj7 8 3,452 11-04-2012, 02:35 PM
Last Post: royalj7
  run time driver potts.mike 3 2,148 02-06-2011, 06:49 PM
Last Post: Dean Roddey
  Help - Trying to compare to Time fields sic0048 10 4,265 11-19-2010, 11:48 AM
Last Post: sic0048
  Formatting STDRtv time / date Sendero 2 2,205 01-27-2009, 12:56 AM
Last Post: Sendero
  Lights go off after set time ellisr63 3 2,243 12-16-2007, 09:05 AM
Last Post: ellisr63
  Trigger to test day and time conditions, is it possible? penngray 2 1,818 01-23-2007, 05:25 AM
Last Post: penngray
  Date/Time Driver - Ready for Test Mikla 3 2,510 01-10-2007, 04:28 PM
Last Post: Mikla
  Date/Time Driver? Mikla 2 1,982 01-07-2007, 05:29 PM
Last Post: Mikla

Forum Jump:

Users browsing this thread: 1 Guest(s)