Skip to content

Conversation

@aleksandr-samila
Copy link
Member

Closes #271

@aleksandr-samila
Copy link
Member Author

image

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)");
Copy link
Contributor

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

https://www.timeanddate.com/time/gmt-utc-time.html

Copy link
Member Author

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

Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Contributor

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.

Copy link
Member

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.

@aleksandr-samila aleksandr-samila merged commit 69d3773 into master May 14, 2021
@aleksandr-samila aleksandr-samila deleted the utc-time branch May 14, 2021 12:51
@ramonsmits ramonsmits changed the title Added gmt time Added UTC time May 15, 2021
@sergioc sergioc added this to the 1.30.0 milestone May 18, 2021
@sergioc sergioc changed the title Added UTC time Show UTC time next to browser time in timestamp tooltips May 26, 2021
@WojcikMike WojcikMike added the Type: Improvement Type: Improvement label May 31, 2021
WilliamBZA pushed a commit that referenced this pull request Feb 17, 2023
* Added gmt time

* changed the lable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Improvement Type: Improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Age of items should show UTC + Browser time when hovering

5 participants