phntxx / dashboard

:bar_chart: a nice and simple dashboard / landing page.
MIT License
951 stars 55 forks source link

Timezone? #41

Closed cinderblockgames closed 2 years ago

cinderblockgames commented 2 years ago

Is there a default way to set the timezone for this container? The day of week changes too early, but the date changes at the right time, which is weird.

cinderblockgames commented 2 years ago

Okay, found how to do it, but it doesn't fix the day-of-week issue.

For reference: the base image uses tzdata, so TZ is the environment variable to use.

cinderblockgames commented 2 years ago

Okay, it looks like greeter.tsx uses getUTCDay() (line 96) and getUTCMonth() (line 98), so changing the timezone doesn't matter. Should this use local time?

Also, this runs on the server, right? Why not just do it completely on the client-side? That would make it accurate to the user instead of to the server.