Make export date/time respect configured timezone in config (#10750)

* Make export page timezone aware

* Fix changeover
This commit is contained in:
Nicolas Mowen
2024-03-30 13:07:30 -06:00
committed by GitHub
parent 4d522be7fb
commit 5b5606cb8a
3 changed files with 107 additions and 10 deletions

View File

@@ -235,7 +235,7 @@ export const getDurationFromTimestamps = (
* @param timezone string representation of the timezone the user is requesting
* @returns number of minutes offset from UTC
*/
const getUTCOffset = (date: Date, timezone: string): number => {
export const getUTCOffset = (date: Date, timezone: string): number => {
// If timezone is in UTC±HH:MM format, parse it to get offset
const utcOffsetMatch = timezone.match(/^UTC([+-])(\d{2}):(\d{2})$/);
if (utcOffsetMatch) {