-
For this method, is the assumption that the times passed are local times or UTC times? I have a test task set to start at midnight and runs every hour. If I run the following code:
The times I get are not the expected times. Instead of starting with 5/1/2023 01:00, it starts with 4/30/2023 20:00 and gives me the expected 24 run times. This happens even if I check the "Synchronize across time zones" checkbox in Task Scheduler. If I create the DateTime objects without the kind parameter, then update them with What am I doing wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The |
Beta Was this translation helpful? Give feedback.
The
DateTime
values returned should all be inDateTimeKind.Local
. An automatic conversion is done for the input values to local time, so it shouldn't matter their kind.