2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-08 12:06:51 +08:00

FIX: compares timezones on utc offset and not name (#6672)

This commit is contained in:
Joffrey JAFFEUX 2018-11-27 12:36:19 +01:00 committed by GitHub
parent 54c599c7a3
commit 75dac31323
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View file

@ -121,7 +121,9 @@
};
const _applyFormatting = (dateTime, displayedTimezone, options) => {
const sameTimezone = displayedTimezone === moment.tz.guess();
const sameTimezone =
moment.tz(displayedTimezone).utcOffset() ===
moment.tz(moment.tz.guess()).utcOffset();
const inCalendarRange = dateTime.isBetween(
moment().subtract(2, "days"),
moment().add(2, "days")