vipzhicheng / logseq-plugin-block-calendar

A block calendar for Logseq.
MIT License
37 stars 13 forks source link

Clicked date results in display of date one day previous to selection #19

Closed rosslaird closed 1 year ago

rosslaird commented 1 year ago

When I click on a date in the block calendar (0.1.8), whether through a directly rendered calendar on a given page or in the context of the banners plugin, the journal page that I am taken to is one day before the day that I clicked. For example, when I click on October 20, I am delivered to the journal page for October 19. This persists through a restart of Logseq and changing the weekly start date settings (and reloading/restarting).

rosslaird commented 1 year ago

Related to #17. I've discovered that this mismatch only happens if I click on a date after the 9th of a given month.

lilakk commented 1 year ago

Yeah I have the same issue. This is a very handy plugin and it'd be great if this can be fixed soon.

vipzhicheng commented 1 year ago

It's fixed now, please upgrade and confirm.

gmalone commented 1 year ago

Still, going to wrong dates > 9 after updating. v 0.1.11 😥 BTW, thanks for excellent plugin.

vipzhicheng commented 1 year ago

I guess It's related to timezone. could you tell me your timezone?

gmalone commented 1 year ago

I'm in US Mountain time zone. GMT -7

Not sure the time zone is the issue, though, but you can verify. Others reporting this issue are clearly from different time zones, yet report the same issue... clicking on the calendar dates (after the 9th of every month) goes to the wrong journal date... 1 day earlier than it should.

Once you spot the issue in the code you'll say "Ah hah! Found it!" (one of the best things about coding)

day-of-month >= 10 points to wrong date

Thanks for looking into it. And thanks for the super useful plugin. :)

rosslaird commented 1 year ago

I'm on PST (GMT—8).

ahpatel commented 1 year ago

My timezone is EST (GMT -5) and I am also still experiencing the issue.

cleanclothes-pi commented 1 year ago

Reporting back that with v0.1.12 update selecting a date in block calendar now opens the correct journal page. Thank you for the fix.

gmalone commented 1 year ago

Thanks for working on this. Sorry to report, no change in function. I updated to 0.1.12, restarted Logseq, and no change. See attached video. Thanks for persisting. It's a worthy plugin.

https://user-images.githubusercontent.com/3749543/209976400-dc60f99b-9771-4a23-a7de-5d26639bf508.mp4

gmalone commented 1 year ago

Yo, bought you some coffee. ☕☕☕ Thanks for the work on the plugin(s).

vipzhicheng commented 1 year ago

Yo, bought you some coffee. ☕☕☕ Thanks for the work on the plugin(s).

Thanks for your support, I still can not reproduce this issue, but I tried another way in the timezone direction. Please have a try.

dwrhodes commented 1 year ago

I think you've got it this time. I'm in PST (GMT -8). I can click on any date and they all come up correctly.