diff --git a/my/google/takeout/html.py b/my/google/takeout/html.py index 5d65a86..d393957 100644 --- a/my/google/takeout/html.py +++ b/my/google/takeout/html.py @@ -5,12 +5,14 @@ Google Takeout exports: browsing history, search/youtube/google play activity from enum import Enum import re from pathlib import Path -from datetime import datetime, timezone +from datetime import datetime from html.parser import HTMLParser from typing import List, Optional, Any, Callable, Iterable, Tuple from collections import OrderedDict from urllib.parse import unquote +import pytz + from ...core.time import abbr_to_timezone @@ -29,7 +31,8 @@ def parse_dt(s: str) -> datetime: # old takeouts didn't have timezone # hopefully it was utc? Legacy, so no that much of an issue anymore.. # todo although maybe worth adding timezone from location provider? - tz = timezone.utc + # note: need to use pytz here for localize call later + tz = pytz.utc else: s, tzabbr = s.rsplit(maxsplit=1) tz = abbr_to_timezone(tzabbr)