Dear Adam,
i was playing with script schedule in PA and found that time zone is so confusing and cannot find documentation on how to use it so for example my PSU is running on IIS and server time zone UTC
which is +4 hours ahead of my time in u.s.east
when i pick a schedule and select today date and time to run a script the admin page will save my changes and show me exactly what i have picked based on my current u.s.east time but the script will not run.
when i check the schedules.ps1 script i found time zone ‘America/New_York’ and the time is UTC (PSU server time)
in order for me to execute the script let say 2 minutes from now i had to pick the UTC time of the server and add 2 minutes so the admin page will show me a time 4 hours ahead of mine and the script will execute.
so i cannot understand how PSU is managing the time zone and how can a user schedule a script execution on future time with different time zone
a working example with 2 different time zone will be much appreciated.
I’ll be releasing a build this week to resolve this issue and a few others. Probably in a couple of days. I can kick off a nightly build of 1.5 so you can grab it earlier if you would like. I’ll start that now.
error on description when trying to schedule script run in 1.5.19 nightly
Failed to format description: The conversion could not be completed because the supplied DateTime did not have the Kind property set correctly. For example, when the Kind property is DateTimeKind.Local, the source time zone must be TimeZoneInfo.Local. (Parameter ‘sourceTimeZone’)
in version 1.5.19 you pinged me even that didnt work and the description instead of saying Runs one time. it just says the error above no matter what time or date i chose.
Hmmm. This “fix” is broken…I’ll take another look at this tomorrow. I’m pretty certain I tried a script almost exactly like that so I might need to mess around with it more.
am currently on version 1.5.18 i just went to my automation screen and set a scheduled to run after 2 min from current time
my machine am logged in to is E.S.T timezone
my PSU is hosted on a server running UTC timezone
a scheduled created in schedule.ps1 script as follows
Weird. Ok. Thanks for trying. In my lab I was seeing that when I didn’t have the Z, it would fail with the error you mentioned and then if I removed it everything was correct. I’ll continue to test and adjust the time zones more to see if I can see your behavior.
by the way as extra information i did try something without using GUI
i did the code manually and put UTC timezone and put server time + 2min and it did run on time
the issue is happening up to version 1.5.18 when PSU detect the logged in user time zone and convert it to server time , you will see the time is correct but the script wont run
like for me since it detect timezone America/New-york i had to remodify the created schedule and add 4 more hours for it to run correctly.