Anniversaries: date off by one

I was very pleased this morning to see that it’s my cakeday (on the forum I administer):

And out of curiosity I went to see who else’s cakeday was nearby. Strangely, though, the anniversaries page seems to be a day in the past:

Could it be because I’m in GMT+8?

5 إعجابات

That’s what I think.

Given that Discourse localizes the times it shows you everywhere else in the UI, I feel this is still a “bug” and should be fixed.

3 إعجابات

So there are 24+ different cake day sets? That seems crazy.

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”.

إعجاب واحد (1)

…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.

Not a major issue, of course. :wink:

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.

إعجاب واحد (1)

أعتقد أنه في سياق مجتمع محلي بشكل كبير، يجب أن يُسمح بتحديد المنطقة الزمنية لـ “يوم الكعكة” في Discourse. تغيير منطقة زمنية الخادم ليس شيئًا يمكننا فعله حقًا.

هذه مسألة شائكة، ولا أعرف كيف أحلها، حتى الآن بعد أن سمحنا للمستخدمين بتحديد “المنطقة الزمنية”.

إذا قمت بالتسجيل في منتدى في أستراليا في 2 يناير 2019 الساعة 8 صباحًا.

  • سيكون ذكرى مرور عام وفقًا لـ “يوم الكعكة” في 1 يناير 2019.

  • عندما تزور صفحة الذكريات في الساعة 8 صباحًا في 2 يناير، سترى ذكريات من 1 يناير 2019 بدلاً من اليوم الثاني.

أعتقد أن ما نطلبه هنا هو استخدام المناطق الزمنية “المحلية” كما تم تعريفها في ملفات المستخدمين لمراعاة الأمور.

أي:

  • يجب أن تكون ذكرى مرور عام في 1 يناير 2019 لأن منطقتك الزمنية المحلية في ملف المستخدم هي أستراليا.

  • عندما تزور صفحة الذكريات في اليوم الثاني، يجب أن ترى اليوم الثاني.


في الوقت الحالي، أعتقد أنني أؤيد الإصلاح البسيط، وهو عند عرض صفحة الذكريات، النظر في المنطقة الزمنية المحلية للمستخدم الحالي واستخدام هذا التاريخ بدلاً من تاريخ UTC الحالي، للحالات التي يكون فيها المستخدم مسجلاً للدخول. يجب أن يكون تغييرًا سهلاً جدًا، ربما سطرين من الكود.

@techAPJ هل يمكنك الاضطلاع بهذا.

8 إعجابات

أعتقد أن @tgxworld قد أصلح هذا بالفعل لمراعاة فرق التوقيت عبر:

و

تحرير: أنا في منطقة زمنية UTC+5:30 لكن لدي إزاحة قدرها 6 ساعات، لذا أرى بعض الحالات الحدية للمستخدمين الذين أنشأوا حساباتهم بين 23:30 و00:00. سأقوم بدراسة الأمر.

6 إعجابات

تم الإصلاح عبر:

8 إعجابات