* show timestamp in local time * Implement initializeTimeFixer * Add Misc work WIP * add local time to calendar event * add local dates * update localtime for calendar event * show timestamp in local time * Implement initializeTimeFixer * Add Misc work WIP * add local time to calendar event * add local dates * update localtime for calendar event * return if no utc times on page * add events sidebar * only show 3 events on sidebar * Change wording on events header They won't all be streams
15 lines
409 B
JavaScript
15 lines
409 B
JavaScript
function updateLocalTime(times) {
|
|
function convertUtcTime(timestamp) {
|
|
var time = new Date(timestamp);
|
|
var options = {
|
|
hour: 'numeric',
|
|
minute: 'numeric',
|
|
};
|
|
time = new Intl.DateTimeFormat('en-US', options).format(time);
|
|
return time;
|
|
}
|
|
for (var i = 0; i < times.length; i++) {
|
|
localTime = convertUtcTime(times[i].innerHTML);
|
|
times[i].innerHTML = localTime;
|
|
}
|
|
}
|