4 ms·
Flickr decided that UTC would be the default for their stats. As long as you stick to it, it's not that big of a problem.
by iampims 16y ago
Flickr decided that UTC would be the default for their stats. As long as you stick to it, it's not that big of a problem.
- bretthoerner 16y agoNot if you're trying to save RAM (and operations to fetch said data) by storing stats per day. You'd need all stats to be per-hour in order for it work for any timezone.
- jrockway 16y agoIf you store by day UTC, you'd need two fetches to get a day in some other time zone. But if you store by hour, you need 24 fetches.
- foobarbazetc 16y agoThey can't in their (Disqus) case because they're aggregating all the stats per day into a single value. I guess they could do it 'per account TZ' since the account name is in the key, but that means TZ calc on each write (not that that will make a huge difference in perf). For a generic solution with easy TZ calc, you need to aggregate your stats into hourly values instead (or half hourly if you care about those wacky non-aligned timezones). The increased fetches don't matter because you can just mget them.