-
Notifications
You must be signed in to change notification settings - Fork 132
Present User Selected Time and Now in UTC format #161
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
Present User Selected Time and Now in UTC format #161
Conversation
@@ -532,13 +533,13 @@ $(document).ready(function() { | |||
&& ! Date.parse(sessionStorage.getItem('setSelectedEndTime')) < new Date(userDate.getTime() - 3000)){ | |||
userDate = new Date(sessionStorage.getItem('selectedEndTime')); | |||
} | |||
userDate.setMinutes(now.getMinutes() - now.getTimezoneOffset()); | |||
userDate.setMinutes(userDate.getMinutes() - userDate.getTimezoneOffset()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does .getUTCMinutes()
(as seen line 542) work here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried .getUTCMinutes()
here as well but not producing the same behavior. Will talk to Sana as she was concerned with the timezone
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@duke-harlan Updated the pr to address the comment: use one technique to present both user selected time and now to local time. Please review again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like we're using 2 techniques to accomplish the same change - if they produce the same behavior, lets stick with just one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make sure the same time zone is used across.
Problem statement:
Currently clicking the "Now" button sends the local time now to the query, not the UTC time, since there is a time difference between local time(either in the US or in India) and UTC, if the sloop instance is not running during that time period, we will get an empty screen after clicking the 'Now' button. This is expected behavior, customer who keeps running sloop for a long time will not have this issue.
Solution:
Display both customer selected time and now in UTC format