From a07ca7c0b7e567f2647d13f84db6aed201cde56c Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Sat, 16 Jul 2022 22:30:47 +0200 Subject: remove MyTourbook timezone guessing It turns out that the mt:TourStartTime is also given in UTC, and therefore cannot be used to get the timezone offset. The problem was that my local computer's timezone was the same as the tour timezone, so by the magic of Python's datetime.datetime.fromtimestamp (and the date CLI util), I did not notice that the timestamp actually represents UTC. Sadly, it currently looks like there is no way to extract the time zone from a MyTourbook export. --- tests/unit/test_util.py | 1 - 1 file changed, 1 deletion(-) (limited to 'tests/unit') diff --git a/tests/unit/test_util.py b/tests/unit/test_util.py index 8f45611..e63bd01 100644 --- a/tests/unit/test_util.py +++ b/tests/unit/test_util.py @@ -57,7 +57,6 @@ def test_round_timedelta_to_multiple(delta, multiple, expected): @pytest.mark.parametrize('gpx_file, offset', [ ("Teasi_1.gpx.gz", timedelta(hours=2)), - ("MyTourbook_1.gpx.gz", timedelta(hours=2)), ]) def test_guess_gpx_timezone(gpx_file, offset): asset_dir = Path(__file__).parent.parent / 'assets' -- cgit v1.2.3