File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed
Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change 11#!/usr/bin/env python3
22
3- from zoneinfo import ZoneInfo
43from datetime import datetime , timedelta
54import re
6- import subprocess
75
8- TZ = subprocess .check_output (['timezone.current' ]).decode ().strip ()
96FMT = '%Y-%m-%d %H:%M:%S'
107REGEX_URL = 'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*(), ]|(?:%[0-9a-fA-F][0-9a-fA-F]))+'
118EXCLUDED_URLS = [
@@ -50,7 +47,7 @@ def _add_months(dt: datetime, months: int) -> datetime:
5047 month = total_month % 12 + 1
5148 return dt .replace (year = year , month = month )
5249
53- now = datetime .now (ZoneInfo ( TZ ) )
50+ now = datetime .now (). astimezone ( )
5451today = now .replace (hour = 0 , minute = 0 , second = 0 , microsecond = 0 )
5552tomorrow = today + timedelta (days = 1 )
5653dayaftertomorrow = tomorrow + timedelta (days = 1 )
You can’t perform that action at this time.
0 commit comments