FrostyX / fedora-sponsors

Fedora packager sponsors
https://docs.pagure.org/fedora-sponsors/
4 stars 8 forks source link

Timezones and DST #17

Closed hroncok closed 2 years ago

hroncok commented 2 years ago

On https://docs.pagure.org/fedora-sponsors/timezones the Europe/Prague timezone is listed as UTC+1 when in fact this is the only true half of the year. Now it is UTC+2. Other time zones are listed like this as well.

FrostyX commented 2 years ago

Hello @hroncok, thank you for the report.

as I mentioned in #16, there was deployed an older build of the page because the rebuild mechanism was stuck. I rebuilt the page manually and now Prague is listed as UTC+2. The code for determining this is basically:

import pytz
from datetime import datetime

timezone = pytz.timezone("Europe/Prague")
timezone_now = datetime.now(timezone)
seconds = timezone_now.utcoffset().total_seconds()
hours = int(seconds/60/60)

which is now 2 but I suppose it will be 1 in the winter.

hroncok commented 2 years ago

Thanks.