Display activity date in local time (using the time zone that is stored with the activity), not in UTC #4
2 changed files with 3 additions and 2 deletions
|
|
@ -493,5 +493,6 @@ window.FitPub = {
|
|||
formatDistance,
|
||||
formatPace,
|
||||
formatDateTimeWithTimezone,
|
||||
formatDateWithTimezone
|
||||
formatDateWithTimezone,
|
||||
ensureUTC
|
||||
};
|
||||
|
|
|
|||
|
|
@ -727,7 +727,7 @@ const FitPubTimeline = {
|
|||
* @returns {string} Time ago string
|
||||
*/
|
||||
formatTimeAgo: function(timestamp) {
|
||||
const date = new Date(timestamp);
|
||||
const date = new Date(FitPub.ensureUTC(timestamp));
|
||||
const now = new Date();
|
||||
const secondsAgo = Math.floor((now - date) / 1000);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue