Merge pull request #68 from gbear605/use-local-timezone

Use local timezone instead of UTC-5
This commit is contained in:
Hannah Park 2022-01-27 08:33:36 -05:00 committed by GitHub
commit 3c26541532
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,7 +14,7 @@ export const isWinningWord = (word: string) => {
export const getWordOfDay = () => {
// January 1, 2022 Game Epoch
const epochMs = 1641013200000
const epochMs = new Date('January 1, 2022 00:00:00').valueOf()
const now = Date.now()
const msInDay = 86400000
const index = Math.floor((now - epochMs) / msInDay)