Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BREAKING CHANGE: ScheduledTask: Allow better handling of multiple time zones #440

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

Borgquite
Copy link
Contributor

@Borgquite Borgquite commented Nov 26, 2024

Pull Request (PR) description

Various fixes for StartTime handling in ScheduledTask:

  • StartTime is now processed on the device, rather than at compile time. This makes it possible to configure start times based on each device's timezone, rather than being fixed to the time zone configured on the device where the Desired State Configuration compilation was run. This may be a breaking change if people are relying on the old behaviour (configuring all devices based on the compiling devices' timezone) - but a fixed offset can still be supplied at compile time, and this new flexibility makes it possible to configure (e.g.) many servers to rotate logs at 12:00:00AM, local time, without knowing their timezones.
  • Fixed SynchronizeAcrossTimeZone issue where Test always throws False when a date & time is used where Daylight Savings Time is in operation (ScheduledTask: NOTMATCH when using SynchronizeAcrossTimeZone #374). We were picking up the current date/time Timezone Offset (zzz) which will not adjust based on the DST of the desired date/time offset.
  • Changed the default StartTime date from today to 1st January 1980 to prevent configuration flip flopping, and added note to configuration README to advise always supplying a date, and not just a time.
  • Added examples & note to configuration README to supply a timezone when using SynchronizeAcrossTimeZone.
  • Allow SynchronizeAcrossTimeZone to be used when adding ScheduleType triggers other than 'Once', 'Daily' and 'Weekly'.
  • Updated Test-DateStringContainsTimeZone to process with UTC date strings using Zulu 'Z' string.

This Pull Request (PR) fixes the following issues

Task list

  • Added an entry to the change log under the Unreleased section of the
    file CHANGELOG.md. Entry should say what was changed and how that
    affects users (if applicable), and reference the issue being resolved
    (if applicable).
  • Resource documentation added/updated in README.md.
  • Resource parameter descriptions added/updated in README.md, schema.mof
    and comment-based help.
  • Comment-based help added/updated.
  • Localization strings added/updated in all localization files as appropriate.
  • Examples appropriately added/updated.
  • Unit tests added/updated. See DSC Community Testing Guidelines.
  • Integration tests added/updated (where possible). See DSC Community Testing Guidelines.
  • New/changed code adheres to DSC Community Style Guidelines.

This change is Reviewable

@johlju johlju requested a review from PlagueHO November 26, 2024 16:49
@johlju
Copy link
Member

johlju commented Nov 26, 2024

@PlagueHO if you have time, please review this one. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants