ironmansoftware / powershell-universal

Issue tracker for PowerShell Universal
https://powershelluniversal.com
36 stars 4 forks source link

Execution Time in Jobs list displayed in incorrect time zone #3753

Closed nickdollimount closed 3 weeks ago

nickdollimount commented 1 month ago

Version

5.0.6

Severity

Low

Environment

msi

Steps to Reproduce

When viewing the Jobs list, the Execution Time is displayed off by a few hours.

Expected behavior

The Execution Time should be displayed in the local time zone for accuracy.

Actual behavior

The Execution Time is ahead by 3 hours.

Additional Environment data

PS C:\Users\nickd> get-timezone

Id                         : Atlantic Standard Time
HasIanaId                  : False
DisplayName                : (UTC-04:00) Atlantic Time (Canada)
StandardName               : Atlantic Standard Time
DaylightName               : Atlantic Daylight Time
BaseUtcOffset              : -04:00:00
SupportsDaylightSavingTime : True

Screenshots/Animations

No response

bt-ndollimount commented 1 month ago

@adamdriscoll With 5.0.9 nightly build, this issue is still present.

image image

Omzig commented 1 month ago

The time zone is still off, i am in CST and it is 9:11 am, but the job says 2:11 pm. It would be nice to have the time in my timezone ;)

adamdriscoll commented 1 month ago

🤦‍♂️ ~I see the issue now. I was actually fixing the time on the schedules page being off and didn't notice the tooltip for execution time being off as well. I thought this was a larger problem where the time zones weren't working everywhere but I can reproduce this no problem.~

🤦‍♂️🤦‍♂️- I actually noticed this on v4 not v5. I still can't reproduce at the moment but will give it another look tomorrow.

bt-ndollimount commented 1 month ago

@adamdriscoll This appears to be off in the GIT Status page as well.

image image

Omzig commented 1 month ago

🤦‍♂️ ~I see the issue now. I was actually fixing the time on the schedules page being off and didn't notice the tooltip for execution time being off as well. I thought this was a larger problem where the time zones weren't working everywhere but I can reproduce this no problem.~

🤦‍♂️🤦‍♂️- I actually noticed this on v4 not v5. I still can't reproduce at the moment but will give it another look tomorrow.

I see it in v5, the GMT is gone, but the date is still GMT.

adamdriscoll commented 1 month ago

This is certainly an overall problem with the time conversion for the console. I'm adding a new detail to the My Identity page to help track this down. It will display the detected time zone.

image

I am not seeing this on either my local machine or my VM in PDT. Still futzing with it.

EDIT: I've adjusted how this works to just use the client-side DayJS library to avoid converting the timezones at the server at all. This change will be in tonight's nightly build.

bt-ndollimount commented 4 weeks ago

@adamdriscoll This appears to still be off in public release of 5.0.10. image image

Omzig commented 4 weeks ago

image

adamdriscoll commented 4 weeks ago

This is something fundamental I'm missing here. Here's 5.0.10 running a VM that is in PDT. Accessing it there gives the time in that time zone. Accessing the same server and viewing the same jobs from my machine in CDT returns the correct time in CDT.

image

adamdriscoll commented 3 weeks ago

We determined this is a PostgreSQL problem.