improved local timezone

This commit is contained in:
Bernt Christian Egeland 2021-12-12 00:46:00 +00:00
parent 91027a7108
commit d8a864f80b

View File

@ -3,8 +3,7 @@ import { useEffect, useState, useCallback, useMemo, useRef } from 'preact/hooks'
import ArrowRight from '../icons/ArrowRight';
import ArrowRightDouble from '../icons/ArrowRightDouble';
const oneDay = 60 * 60 * 24 * 1000;
const todayTimestamp = Date.now() - (Date.now() % oneDay) + new Date().getTimezoneOffset() * 1000 * 60;
const todayTimestamp = new Date().setHours(0, 0, 0, 0).valueOf();
const Calender = ({ onChange, calenderRef, close }) => {
const keyRef = useRef([]);