benvinegar / counterscale

Scalable web analytics you run yourself on Cloudflare
https://counterscale.dev
MIT License
1.52k stars 66 forks source link

Use timezone from browser instead of cloudflare.cf.timezone #109

Closed benvinegar closed 2 weeks ago

benvinegar commented 2 weeks ago

cloudflare.cf.timezone is too unreliable and causes issues like #108 and #107, among others.

We should instead do the following:

There's some trickyness here because Counterscale is server-rendered (with some client-rendered components). Which means we may not have the timezone on first render, unless we intentionally force the user through an empty page that captures the timezone then redirects.