That’s one way to look at it I guess. But I’m assuming the users are queried on page load, so there’s really only “one” set at a time.
Here’s a better example. The post you just made shows up for me as “June 8, 2017 12:45 AM”. If I was to fly across the country to California, I’d expect that post to show as “June 7, 2017 9:45 PM”.
…and I just earned the “anniversary” badge this morning. This does feel like a bug to me.
Could it be mitigated by simply changing the timezone of the server to something more applicable for my community? We’re (mainly) in Australia, so processing everything as, say, GMT+8 or GMT+10 would make this all feel less odd.
Since the server doesn’t know a user’s time zone, maybe the easiest fix for this would be to award the badge one day later? For some, that will mean they get it late, but that will probably not be experienced as a bug as much as an early award is.
Another option might be to simply specify in the UI that these times are based on the server’s time zone.
Penso che nel contesto di una comunità fortemente localizzata si dovrebbe poter specificare il fuso orario per il “cakeday” di Discourse. Cambiare il fuso orario del server non è davvero qualcosa che possiamo fare.
È una questione delicata e non sono sicuro di come risolverla, anche ora che permettiamo agli utenti di specificare i “fusi orari”.
Se ti sei iscritto a un forum in Australia il 2 gennaio 2019 alle 8:00:
Il tuo anniversario di un anno secondo il “cakeday” sarà il 1° gennaio 2020.
Quando visiti la pagina degli anniversari alle 8:00 del 2 gennaio, vedrai gli anniversari del 1° gennaio 2020 invece del 2.
Credo che ciò che stiamo chiedendo qui sia di utilizzare i fusi orari “locali” definiti negli utenti per tenere conto di questi aspetti.
Cioè:
Il tuo anniversario di un anno dovrebbe essere il 2 gennaio 2020 perché il tuo fuso orario locale nel profilo utente è l’Australia.
Quando visiti la pagina degli anniversari il 2, dovresti vedere il 2.
Per ora penso che sostenga la soluzione più semplice: quando si visualizza la pagina degli anniversari, controllare il fuso orario locale dell’utente corrente e utilizzare quella data invece della data UTC attuale, nei casi in cui un utente è connesso. Dovrebbe essere una modifica piuttosto semplice, forse due righe di codice.
Credo che @tgxworld abbia già risolto il problema per tenere conto dello sfasamento orario tramite:
e
MODIFICA: Sono nel fuso orario UTC+5:30 ma ho uno sfasamento di 6 ore, quindi sto notando alcuni casi limite per gli utenti che hanno creato l’account tra le 23:30 e le 00:00. Sto indagando.