Skip to content

Commit

Permalink
fix: wait for marnusw/date-fns-tz#265
Browse files Browse the repository at this point in the history
  • Loading branch information
kuus committed Jan 11, 2024
1 parent 208ea91 commit dd53bf5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/browser/getZonedDate.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import utcToZonedTime from "date-fns-tz/utcToZonedTime";
// import utcToZonedTime from "date-fns-tz/utcToZonedTime";
import { isBrowser } from "@koine/utils";

// FIXME: https://github.com/marnusw/date-fns-tz/pull/265
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const utcToZonedTime = (date: Date, _tz: string) => {
return date;
};

/**
* It returns a `Date` object from a date `string` adjusted on the user timeZone,
* if a timeZone is not provided we try getting it from the `Intl` browwser native
Expand All @@ -24,7 +30,7 @@ export function getZonedDate(dateString = "", timeZone?: string) {
} catch (e) {
if (process.env["NODE_ENV"] === "development") {
console.warn(
"[@koine/utils:getZonedDate] failed reading timeZone, error",
"[@koine/browser:getZonedDate] failed reading timeZone, error",
e,
);
}
Expand Down

0 comments on commit dd53bf5

Please sign in to comment.