-
Notifications
You must be signed in to change notification settings - Fork 26
Show UTC time next to browser time in timestamp tooltips #1056
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
Conversation
| if (value && attrs.date !== minDate) { | ||
| m = moment(attrs.date); | ||
| element.attr('title', m.format('LLLL')); | ||
| element.attr('title', m.format('LLLL') + " (local)\n" + m.utc().format('LLLL') + " (GMT)"); |
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.
Can we change it to UTC? Overall that expresses the same intent. But UTC express time zones while GMT is a time zone with UTC+0
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.
you mean just to change a label? yep, why not
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.
Check the original issue for the rationale to use GMT (to match timestamps in logs). Not sure if UTC is a good idea.
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.
Yesterday I found this: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toGMTString - it's not recommended. And in any case it's just a label, because there is utc() function that is used and there is no gmt() one.
And physically - the difference between these two systems is a few seconds - nothing to discuss. Just need to make a decision.
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.
@sergioc the original issue is incorrect. Meaning, the logs states:
2020-10-29 07:20:57.8920|228|Info|ServiceControl.Audit.Infrastructure ...
So the printed output does not display what timezone it uses. As such when expressing a universal time it should express in UTC - which is a standard and not GMT - which is the name of the timezone UTC+0. It is a common mistake but using GMT is not accurate.
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.
Agreed, UTC is the better name and was also my intend.
* Added gmt time * changed the lable

Closes #271