diff --git a/google_takeout_parser/__main__.py b/google_takeout_parser/__main__.py index af5eda1..75741c6 100644 --- a/google_takeout_parser/__main__.py +++ b/google_takeout_parser/__main__.py @@ -140,7 +140,7 @@ def parse( # note: actually no exceptions since since they're dropped if cache: if filter_: - logger.warn( + logger.warning( "As it would otherwise re-compute every time, filtering happens after loading from cache" ) res = list(tp.parse(cache=True)) @@ -173,7 +173,7 @@ def merge( filter_type = tuple(FILTER_OPTIONS[ff] for ff in filter_) if cache: if filter_: - logger.warn( + logger.warning( "As it would otherwise re-compute every time, filtering happens after loading from cache" ) res = list(cached_merge_takeouts(list(takeout_dir), locale_name=locale)) diff --git a/google_takeout_parser/parse_json.py b/google_takeout_parser/parse_json.py index 681bfc3..6b2e25a 100644 --- a/google_takeout_parser/parse_json.py +++ b/google_takeout_parser/parse_json.py @@ -269,7 +269,9 @@ def _parse_chrome_history(p: Path) -> Iterator[Res[ChromeHistory]]: yield RuntimeError(f"Chrome/BrowserHistory: no 'Browser History' key in '{p}'") for item in json_data.get("Browser History", []): try: - time_naive = datetime.utcfromtimestamp(item["time_usec"] / 10**6) + time_naive = datetime.fromtimestamp( + item["time_usec"] / 10**6, tz=timezone.utc + ) yield ChromeHistory( title=item["title"], # dont convert to https here, this is just the users history