diff --git a/package.json b/package.json index 2552b09..814d94d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ztimson/utils", - "version": "0.22.10", + "version": "0.22.11", "description": "Utility library", "author": "Zak Timson", "license": "MIT", diff --git a/src/time.ts b/src/time.ts index d51b72c..a6ddff5 100644 --- a/src/time.ts +++ b/src/time.ts @@ -22,8 +22,8 @@ export function adjustedInterval(cb: Function, ms: number) { export function adjustTz(date: Date, offset: number) { const currentOffset = date.getTimezoneOffset(); - offset = currentOffset - offset * 60; - return new Date(date.getTime() + offset * 60000); + const adjustedOffset = offset * 60; + return new Date(date.getTime() + (currentOffset - adjustedOffset) * 60000); } /**