adjust dev meeting time for daylight savings

This commit is contained in:
Shawn Erquhart 2018-03-28 11:55:56 -04:00
parent 600400cfda
commit 050f1a3387

View File

@ -111,10 +111,12 @@ var eventInfoLoad = function() {
};
function updateDate(eventDate) {
$('.month').append(moment(eventDate).format('MMMM'));
$('.day').append(moment(eventDate).format('DD'));
$('.calendar-cta h3 strong:first-child()').append(moment(eventDate).format('dddd, MMMM Do'));
$('.calendar-cta h3 strong:last-child()').append(`${moment(eventDate).utcOffset(-8).format('h a')} PT`);
const eventDateMoment = moment(eventDate);
const offset = eventDateMoment.isDST() ? -7 : -8;
$('.month').append(eventDateMoment.format('MMMM'));
$('.day').append(eventDateMoment.format('DD'));
$('.calendar-cta h3 strong:first-child()').append(eventDateMoment.format('dddd, MMMM Do'));
$('.calendar-cta h3 strong:last-child()').append(`${eventDateMoment.utcOffset(offset).format('h a')} PT`);
}
eventRequest.send();