Skip to content

LunarCalendar Plugin does not show current day #65

@DavidOrtmann

Description

@DavidOrtmann

If I'm reading the code correctly, the current today method in the LunarCalendar plugin has a potential timezone problem:

Problem:

def today
  user.datetime_now.to_date
end

When the plugin is called at edge times (e.g., 00:15 CET for 1x/day refresh) and since the polling server is located in a different timezone, the .to_date conversion may return the wrong date. This leads to incorrect moon phase calculations, especially for users in timezones ahead of the server.

Impact:

  • Wrong current moon phase
  • Incorrect next full/new moon dates
  • Inaccurate phase sequence display

I currently don't have a solution implemented, but I believe the user's UTC offset should be used to ensure the date calculation happens in the user's local timezone rather than the server's timezone.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions