Kosmorro / kosmorro

A program to calculate your ephemerides.
https://kosmorro.space
GNU Affero General Public License v3.0
60 stars 7 forks source link

Timezone not correctly used on next Moon phase date #216

Closed thierry-FreeBSD closed 2 years ago

thierry-FreeBSD commented 2 years ago

I have searched for an opened issue and didn't find my bug

Version of Kosmorro

0.10

Version of Python

3.8

Operating system

FreeBSD

Installation source

I have compiled the package from source

Bug description

No difference between UTC and UTC+1. E.g.

$ LC_ALL=C kosmorro
Saturday November 20, 2021

Moon phase: Full Moon
Last Quarter on Saturday November 27, 2021 at 12:27

Note: All the hours are given in UTC.
$ LC_ALL=C kosmorro -t 1 
Saturday November 20, 2021

Moon phase: Full Moon
Last Quarter on Saturday November 27, 2021 at 12:27

Note: All the hours are given in the UTC+1 timezone.

Both display the same time 12:27.

Deuchnord commented 2 years ago

Looks like this only affects the hour of the next Moon phase. kosmorrolib.get_moon_phase() is called without the timezone parameter: https://github.com/Kosmorro/kosmorro/blob/master/_kosmorro/main.py#L158 Thanks for the catch!