update pytz to 2023.2/2023b tzdata

Brian Inglis Brian.Inglis@Shaw.ca
Sun Mar 26 20:45:56 GMT 2023


On 2023-03-07 22:11, Marco Atzeri wrote:
> On 07.03.2023 22:35, marco atzeri wrote:
>> On Tue, Mar 7, 2023 at 10:18 PM Brian Inglis wrote:
>>> On 2022-03-20 10:00, Brian Inglis wrote:
>>>> On 2021-12-21 09:06, Marco Atzeri wrote:

>>>>> python39-pytz                           2021.3-1

>>> Update needed to 2022g/2022.7.1 as a new Mexican zone was added since
>>> 2021c/2021.3 due to Mexican changes conflicting with US practices, affecting
>>> border towns:

> 2022.7.1 is up

Thanks Marco,

Looks like pytz needs another update as tzdata was updated twice this week!
Some middle eastern governments just realized Ramadan was during DST ;^>

$ pytz-date.py "%Y %b %d %a %T %Z%z" Asia/Beirut
2023 Mar 26 Sun 20:41:45 UTC+0000       zoneinfo        UTC
2023 Mar 26 Sun 22:41:45 EET+0200       zoneinfo        Asia/Beirut
2023 Mar 26 Sun 23:41:45 EEST+0300      pytz            Asia/Beirut

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
                                 -- Antoine de Saint-Exupéry
-------------- next part --------------
#!/usr/bin/python
# pytz-date.py - print current pytz date time in $1 format in $2 given zone

from datetime import datetime
from zoneinfo import ZoneInfo
from pytz import timezone
import pytz
import sys

# date -u +"$1"    - zoneinfo
print( datetime.now( ZoneInfo( "UTC" )).strftime( sys.argv[1] + "%tzoneinfo%tUTC" ))
# TZ=$2 date +"$1" - zoneinfo
print( datetime.now( ZoneInfo( sys.argv[2] )).strftime( sys.argv[1] + "%tzoneinfo%t" + sys.argv[2] ))
# TZ=$2 date +"$1" - pytz
print( datetime.now().astimezone( timezone( sys.argv[2] )).strftime( sys.argv[1]  + "%tpytz%t%t" + sys.argv[2] ))



More information about the Cygwin mailing list