Fix UTC/GMT parsing, what the heck was I thinking when I wrote that
This commit is contained in:
parent
123aaa89a0
commit
cd95894691
|
@ -134,8 +134,8 @@ const parseEventTimeZone = (preParsedEventTimeZone: string): [string, string] =>
|
|||
addPlusSign = true;
|
||||
}
|
||||
// Determine if we need to prepend UTC/GMT, handle adding the + into the string
|
||||
if (!preParsedEventTimeZone.startsWith('UTC') && preParsedEventTimeZone.startsWith('GMT')) {
|
||||
preParsedEventTimeZone = `UTC${addPlusSign && '+'}${preParsedEventTimeZone}`;
|
||||
if (!preParsedEventTimeZone.startsWith('UTC') || preParsedEventTimeZone.startsWith('GMT')) {
|
||||
preParsedEventTimeZone = `UTC${addPlusSign ? '+' : ''}${preParsedEventTimeZone.startsWith('GMT') ? preParsedEventTimeZone.slice(3) : preParsedEventTimeZone}`;
|
||||
} else if (addPlusSign) {
|
||||
preParsedEventTimeZone = `${preParsedEventTimeZone.slice(0, 3)}+${preParsedEventTimeZone.slice(3)}`;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue