Skip to content

Ultimate improvement of the library#10

Open
imihajlow wants to merge 2 commits intoevq:masterfrom
flipperdevices:master
Open

Ultimate improvement of the library#10
imihajlow wants to merge 2 commits intoevq:masterfrom
flipperdevices:master

Conversation

@imihajlow
Copy link

Ported scripts to python3, fixed a lot of bugs, added unit tests, cleaned-up and changed library interface to prevent name collisions. Basically, made this library useful (before the fix even the leap year function had a bug).

* Port compile_tzlinks.py to python3, use geonames instead of nominatim

* Port other scripts to python3

* Update timezone database

* Fix leap year formula

* Make zone names char

* Reduce C warnings

* Make declarations extern

* Add leap year test

* Unit tests, some refactoring and fixes

* Fix and test daylight saving time for US

* Test DST on previous UTC day

* More tests

* Timezone iterator function

* Handle no rules case

* Add default timezone

* More initialization functions

* Negate and subtract offset

* Add aliased datetime fields

* Compile zones

* Set tz name pointer from the table

* 16-bit year

* Apply namespace to types

* Apply namespace to macros

* Newline at EOF

* Export zone count

* Offset comparison function

* Delete controversial comment

* Format abbreviations with %s
* Add some timezone abbreviations, fix Central Asia

* Accept multiple whitelists

* Accept a blacklist, fix Tonga

* Clean up cities
@bxparks
Copy link

bxparks commented Feb 6, 2026

Hello,

I am not @evq, the maintainer of this library. I am just an interested 3rd party who looked into this code about 6 years ago. At the time, I had a pretty good understanding of this library. I have probably forgotten most of it by now.

But first thing: I am pretty sure that this library is abandoned and no longer maintained. Before you do any more work on it, you may want to contact @evq and figure out whether it's worth pursuing this PR.

I think this library has some really good ideas, and it would be great to see the ownership and maintenance transferred to a motivated maintainer. But that's completely up to @evq.

Or you could fork the library and maintain the fork.

(Why don't I volunteer to maintain this library? Because I have already taken the core ideas here, and rewrote it into a completely different timezone library that I now maintain. This particular version of a timezone library is not useful to me.)

I took a cursory look through your PR, and at the high level, it looks like a pretty good upgrade. I had some comments and concerns about a few things, but it would be waste of everyone's time to send those comments if this PR is going to die anyway.

@imihajlow
Copy link
Author

@bxparks my fork is already maintained and used commercially, the changes have been reviewed and tested in a real project. This PR is "take it or leave it", I just thought it would be nice to revive, fix and refresh this project and make my work available in the original repository too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants