[Solved] Programmatically get the time at clock-change [closed]

To find out DST transitions, you could access Olson timezone database e.g., to find out the time of the next DST transition, in Python: #!/usr/bin/env python from bisect import bisect from datetime import datetime import pytz # $ pip install pytz def next_dst(tz): dst_transitions = getattr(tz, ‘_utc_transition_times’, []) index = bisect(dst_transitions, datetime.utcnow()) if 0 <= … Read more