ArtVentureX / sd-webui-agent-scheduler

619 stars 63 forks source link

Improve date formatting and fix CSS rules not being applied #112

Closed MMP0 closed 1 year ago

MMP0 commented 1 year ago

Also fix an issue with scrolling on click in some browsers and update dependencies.

artventuredev commented 1 year ago

It seems your changes have caused the task to display an incorrect time. You may want to revert the changes I made a few days ago.

Screenshot 2023-08-14 at 04 17 43
MMP0 commented 1 year ago

I would appreciate it if you could tell me how many hours behind or ahead the time is. In my environment it was correct both locally and on cloud servers outside the country.

Since the time zone of DateTime is lost in SQLLite, this PR adds a custom type that parses it from the database as server local time and converts it to UTC epoch milliseconds on the server side (agent_scheduler/db/task.py). The JavaScript Date constructor takes UTC epoch milliseconds as an argument, so it should be able to correctly convert to client-side local time. I don’t think it’s a good idea to convert server local time with a client-side time offset.

artventuredev commented 1 year ago

My apologies, I made an oversight and didn't switch to your date-fix branch before testing. Now that I have, everything works perfectly. Thank you for your hard work.