jerone / UserScripts

🐵 My UserScripts
https://github.com/jerone/UserScripts#readme
GNU General Public License v3.0
339 stars 39 forks source link

(Github Comment Enhancer) Disable localized time zone? #96

Closed rugk closed 8 years ago

rugk commented 8 years ago

When quoting comments how does it get out what time zone to use? Does it always try to use the local one?

I would like to have an option to use UTC instead.

jerone commented 8 years ago

[GCE](https://github.com/jerone/UserScripts/tree/master/Github_Comment_Enhancer#readme Github Comment Enhancer) uses what GitHub supplies in the timestamps' title attribute, provided by the <time> web component extension. According their documentation, "lets the browser choose how to localize the displayed time according to the user's preferences". GCE doesn't do any time calculations itself. I'm going to look into their docs if it's possible to calculate a new time that isn't localized.

jerone commented 8 years ago

Note to self:

var date = new window.RelativeTimeElement("2016-01-05T19:09:05Z");
//document.body.appendChild(date);
date.dateTime = "2016-01-05T19:09:05Z";
//date.attributeChangedCallback("datetime", undefined, "2016-01-05T19:09:05Z");
date.createdCallback();
console.log(date);
jerone commented 8 years ago

Closing this issue as Github Comment Enhancer is deprecated.