Revert "parse date labels by local timezone instead of UTC (#2601)" (#2619)

This reverts commit 7a7076ed20.
pull/2626/head r2023.01.24-45
Adam Rutkowski 4 years ago committed by GitHub
parent c1d174d0fa
commit 5bb53c7e35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,4 +1,4 @@
import {formatMonthYYYY, formatDay, formatDayShort} from '../../util/date'
import {parseUTCDate, formatMonthYYYY, formatDay, formatDayShort} from '../../util/date'
const browserDateFormat = Intl.DateTimeFormat(navigator.language, { hour: 'numeric' })
@ -7,7 +7,7 @@ const is12HourClock = function() {
}
const parseISODate = function(isoDate) {
const date = new Date(isoDate)
const date = parseUTCDate(isoDate)
const minutes = date.getMinutes();
return { date, minutes }
}
@ -60,7 +60,7 @@ const hourIntervalFormatter = {
},
short(isoDate, _options) {
const formatted = formatHours(isoDate)
if (is12HourClock()) {
return formatted.replace(' ', '').toLowerCase()
} else {

Loading…
Cancel
Save