Skip to content

Use UTC for application assignment deadlines#63

Open
chryzsh wants to merge 1 commit intoMayyhem:mainfrom
chryzsh:utc-deadline-only
Open

Use UTC for application assignment deadlines#63
chryzsh wants to merge 1 commit intoMayyhem:mainfrom
chryzsh:utc-deadline-only

Conversation

@chryzsh
Copy link
Copy Markdown

@chryzsh chryzsh commented Mar 23, 2026

Description

I was playing with EXEC-1 in my lab and had some issues getting applications to fire. I found the code was using DateTime.Now while also setting UseGMTTimes = true, which would make SCCM treat the deadline as being in the future if the operator machine with a different timezone from the SCCM environment. I guess this is likely very rarely an issue, but it happened in my lab so maybe this could happen if you are ever operating across timezones or have forgot to set the system time on either side.

This changes the timestamp to DateTime.UtcNow with +000 so the start time and enforcement deadline are always written as real UTC values which would be relative on the operator computer and the target client.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Testing

  • Reproduced delayed execution before the change.
  • Ran the same exec flow after the change.
  • Confirmed the client treated the deployment deadline as immediate instead of delayed.

SharpSCCM_merged.exe exec -p "cmd.exe /c whoami > C:\temp\usertest.txt" -d client --no-banner -sms mecm -sc p01

Test Configuration:

  • SCCM Site Version (result of.\SharpSCCM.exe get class-instances SMS_Site -p Version): Version: 5.00.9128.1000
  • SCCM Client Version (result of .\SharpSCCM.exe local class-instances SMS_Client): ClientVersion: 5.00.9128.1007

Bonus Points:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant