D22391: When evaluating twilight restriction, shift dusk to next day when it happens before dawn on the same day.

Eric Dejouhanet noreply at phabricator.kde.org
Thu Jul 11 07:44:48 BST 2019

TallFurryMan created this revision.
TallFurryMan added reviewers: mutlaqja, wreissenberger.
Herald added a project: KDE Edu.
Herald added a subscriber: kde-edu.
TallFurryMan requested review of this revision.

  Near the summer solstice, it may happen that dusk occurs before dawn on the same day.
  The twilight restriction did not take this situation into account, and was unable to shift restricted jobs to the next dusk.
  This change shifts dusk to the next day when it happens before dawn on the same day, resolving this issue when evaluating jobs.
  This change also fixes the accompanying exception on dark sky score occurring when debugging in that situation, as the job was occuring during daytime.

  Test during a period of the year where dusk happens after the local midnight, so that "dusk happens before dawn", for instance around 1am.
  Test during daytime, so that a default ASAP job would happen during the day (this is not required given the execution path, but makes the end-user issue obvious).
  Add a single job on a circumpolar target, with twilight restriction, ASAP startup, and let Scheduler evaluate.
  - Without this change, job startup is left unmodified although it will start during daytime. An exception happens if debugging.
  - With this change, job startup is properly shifted to next dusk, on the following day. No exception is triggered.

  R321 KStars

  bugfix__dawn_dusk_day (branched from master)



To: TallFurryMan, mutlaqja, wreissenberger
Cc: kde-edu, narvaez, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20190711/2e622e79/attachment-0001.html>

More information about the kde-edu mailing list