Luzefiru / wuwatracker

wuwatracker.com - A Collection of Wuthering Waves Tools; Pity Tracker, Game Calendar, Data Exporter, and more!
https://wuwatracker.com
62 stars 18 forks source link

Timezone in Timeline #68

Open paragkatoch opened 5 days ago

paragkatoch commented 5 days ago

Problem

The time in Timeline is without timezone. Thus leading to confusion.

Screenshot 2024-06-26 at 10 09 54 AM

Possible Solution

Really like the idea of crowdsourcing the event updates, but we can add a rule to it that the time should be in server time i.e., UTC+8 and then we can convert it to the user's timezone on client side.

Luzefiru commented 5 days ago

Currently, the data is indeed using the server time (UTC+8) based on the in-game announcements from SEA and their official website notices. But ideally, I'd want to make it much easier for the user to update the site data without having to do the conversions themselves.

To combat this in the meantime, I added a comment beside the type definition to use the server time, but there has to be a better way to do it.

export interface Event {
  id?: number; // announcement id
  name: string;
  description?: string;
  img: string;
  startDate: string; // use Server time (UTC+8)
  endDate: string; // use Server time (UTC+8)
  color?: string; // defaults to automatically detecting the img color (prefer darker colors)
  url?: string; // link to an informative page about the event
  showOnHome?: boolean; // whether we show it in the home dashboard
}

Thanks for raising this issue!

Luzefiru commented 4 days ago

Hiya @paragkatoch, the website has been updated to automatically detect the user's local time zone. It also has the options to pick which game server time you'd like to view as.

To keep it accurate, we still have to encode the data here as CST (UTC+8) YYYY-MM-DD HH:mm strings. What do you think?

test

paragkatoch commented 4 days ago

@Luzefiru The implementation is really good, but I think the conversion is not working as expected for events.

For featured banners

  1. The start time will be different based on regions (13:00 CST, 10:30 IST, 5:00 UTC)
  2. The 'start in' timer should be same for all regions. (since they globally launch at the same time)

I think some events start globally at the same time and other start based on their regional time. Same can be said for end time as well. Need to monitor the start/end time for future events to verify this.

A flag might be needed if the above is true.

https://github.com/Luzefiru/wuwatracker/assets/61873006/b8407b6e-06a4-4b15-be40-74eb84f742f0

Luzefiru commented 4 days ago

I think some events start globally at the same time and other start based on their regional time. Same can be said for end time as well. Need to monitor the start/end time for future events to verify this.

Yeah, this is the case for Genshin. I'm doing my best to look into a proper way to do this at the moment.

Luzefiru commented 4 days ago

Alright, I think I was able to implement your suggestions, @paragkatoch. How does it look on your end?

paragkatoch commented 4 days ago

@Luzefiru Time and timer is working perfectly for my region. But, if I switch to other region then they are wrong.

Like for Chicago its around 23:30 on 27th but it is showing 28th

Screenshot 2024-06-27 at 2 46 16 PM
Luzefiru commented 4 days ago

Okay, I think I found the issue, can I reach you out via Discord? I'd appreciate it if you could make some time to test it out.

paragkatoch commented 3 days ago

Sure, joined the discord channel

antisocial93 commented 3 days ago

image It seems to be perfect now, exactly when server resets at UTC+3

antisocial93 commented 3 days ago

I assume there is no need in this list anymore? image Because its change ruining everything image

Luzefiru commented 3 days ago

Because its change ruining everything

The next update to the site should fix this. Please let me know if you're having any issues despite that, @antisocial93.

antisocial93 commented 3 days ago

Because its change ruining everything The next update to the site should fix this. Please let me know if you're having any issues despite that, @antisocial93.

There is one, btw The hazard zone, which info about i'd commited today to events.ts stopped showing itself in the timeline image image edit: i see, it's because there is no space for it rn?