unsoluble / smalltime

A small FoundryVTT module for displaying and controlling the current time of day.
MIT License
24 stars 15 forks source link

Slight Bug when used with SimpleCalendar (Day is skipped when changing time backwards) #50

Closed GladAlibi closed 3 years ago

GladAlibi commented 3 years ago

Essentially moving time in a negative direction (on the SmallTime slider) automatically changes the date to move forward by one on SimpleCalendar (SC) when it shouldn't.

To be clear I have set the SC config to sync time to "mixed" as recommended and tried it as set to "3rd party" too, both unsuccesful. And outside of this problem everything works and syncs without issue.

When making an adjustment on the slider to move to an earlier time on the same day (e.g. going from dusk at 18:00 back to 12:00 mid-day on the 12th of the month), this causes the SC day to move to the next day (e.g. in this case moves to the 13th of the month). The date that appears on SmallTime (when linked to SC) remains showing the previous day's date (in this case the 12th), but the SC date has moved onto the next day (in this case the 13th).

Also this seems to only happen once on the first time of every FoundryVTT refresh.

I guess it's hard to know which mod is causing it. But since SC seems to handle moving time backwards without changing the date I thought I'd let you know.

PS sorry for all the text, just trying to be specific. Very cool mod btw!

unsoluble commented 3 years ago

Oh that's a weird one — thanks for the report! What game system is this in, and which Foundry version? And I'm assuming latest versions of ST and SC as of yesterday?

unsoluble commented 3 years ago

Ohhhhhhh hang on, I think I might have sorted this. You don't have About Time running too, yeah? Can you test and see if this day advance happens without you clicking anything at all, just a few seconds after loading in every time?

[Edit: Ugh, could only reproduce that briefly, now something else entirely is happening. Anyway, I think I've got a handle on what's basically happening here — there's a date indexing confusion between all the various timekeepers. Will investigate tonight, see if I can get it fixed.]

GladAlibi commented 3 years ago

Yeh actually now it seems to occur whenever Foundry is reloaded as you said (like a 5 second delay after everything visually loads in). This is reproducing itself every refresh for myself.

I only now installed About Time tho. Previously it was working fine without it (except for the initial post I made above). So maybe it only happening when doing negative time input was without About Time. Regardless the issue seems to overlap. And I have Foundry 8.6 and the newest of all the mentioned mods. (Maybe worth mentioning the Simple Calendar running in real time is broken af atm anyways, but probably not the issue (I think)).

PS only saw ur edit after writing this. Ty and good luck with any changes

unsoluble commented 3 years ago

Have confirmed with the SC dev that there's at least one small bug in SC with respect to the displayed date in there not matching the actual date (which is what SmallTime will be displaying). We'll work on it from both ends and hopefully get it all straightened out soon. :)

unsoluble commented 3 years ago

Should be fixed in 1.8.6