torikushiii/hoyolab-auto

Daily Alerts do not appear to be local time

Closed this issue · 11 comments

I am under the impression the daily and weekly alerts were for local time.

I have an NA account that appears to be getting alerts at the set cron time but for Asia timezone. This appears to only be happening for ZZZ.

Is local time suppose to mean the respective game account's server time (NA, EU, Asia), or the server hosting the docker container running the app? I noticed the config is set to TZ=Asia/Shanghai and the timestamps for the logs are based on that timezone.

I believe the alerts should be based on the game account's server's local time zone if that is not what is already intended.

Also, I purposely completed all the tasks in HSR, enough to fill 500+, but did not click to claim them. Battle records in hoyolab still showed 0/500 but I never got an alert to complete dailies when leaving it unclaimed all the way up until an hour before daily reset.

Yes, local time uses your server's time zone. For docker I forgot to put a note that you need to set the TZ environment variable to your server's time zone, so you're correct that it's currently using Asia/Shanghai time zone.

For the alerts based on account server, i do not have any idea yet on how to implement that since cron jobs are based on the server's time zone and if you have multiple accounts on different servers, it will be hard to manage.

Ok, thanks for the clarity and I'll keep that in mind using the feature for now.

Unfortunately it is not very useful when I have a collection of NA, EU, and Asia accounts for many different players and 3 hours before reset doesn't align with everyone's respective server reset time.

If it can't be automatically associated with the account's region server time, is there a way to add an extra parameter for what time in the day we want it triggered for each individual account? similar to stamina threshold.

Hey, can you check the latest commit, I've introduced regional timers for each accounts region so it doesn't rely at server host time anymore.

I just got alerts for SEA accounts at the appropriate time but not other regions, so I'll assume it is working properly. Would need more time to be certain for other regions.

I do have a question how the Weeklies field data is presented though. Is is suppose to show everything or only things yet to be completed?

Below are screenshots of 3 accounts:

  1. Shows Weekly Boss (completed), SU (uncomplete), DU (uncomplete)
  2. Only shows Weekly Boss (completed). Why is this account getting an alert when it appears all tasks are done? At this point I am making the assumption it always displays Weekly Boss regardless of completion status, but only shows SU/DU if they are not completed, but... see 3
  3. Does not show Weekly Boss or SU, only DU (uncomplete)

image

weeklies will shows at the embed if it's not completed and if all your weeklies are completed, then it will not send the notification, the 3/3 attempts means that account still have 3 attempts to do the weekly boss, unless the account owner just did the weekly boss recently and the cache does not expired yet.

I could just fetch the data directly from HoyoLab instead relying on cache, but HoyoLab is very sensitive when it receiving too many requests

Ah ok, I got confused because I had a brain fart. I interpreted 3/3 as having killed 3 bosses and completed all 3 runs for the week. Forgot that hoyo lists the 3/3 as attempts remaining, and the the 0/14000 as points still needed to be filled.

Previously I had my TZ env variable set to Europe/London and my missed-check-in and check-in crons set to run at 4pm and 5pm (when the check-in reset occurs in my timezone), now after the latest commits the check-in cron is running at midnight, is there any way I can have it run at my previous times?

I noticed for HSR (and possibly GI as well), only accounts on SEA did the daily check-in at the usual time the daily check-in resets, which I believe is midnight China time. However, for ZZZ all accounts did the daily check-in at the normal time, but didn't send the embedded notifications to discord.

The daily check-in should work like it previously did where all of them happen at midnight China time since it resets the same time for everyone and there's no action for users to take, unless this is suppose to be a way to not spam hoyolab too much all at once.

@reticence96 @Lynaia reverted the check-in stuff to the old one, I've forgotten that all check-in resets at the same time, sorry about that

hey, im just following up for this issue to see if everything works just as intended!

If you still have any question regarding this issue, feel free to ask here or open a new one!