diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2024-08-08 14:36:50 +0200 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2024-08-08 14:36:50 +0200 |
| commit | be06f04babc12fb60366c24a22561c1d46895c80 (patch) | |
| tree | 8df057a3605a7272cb048043be7593b5c944a67c /overlays | |
| parent | a6754d729f2d16cfdcb3570891c038a14718de1f (diff) | |
| parent | bc90ef66903e78713db1fd3a700785572b794cde (diff) | |
| download | nixos-be06f04babc12fb60366c24a22561c1d46895c80.tar nixos-be06f04babc12fb60366c24a22561c1d46895c80.tar.gz nixos-be06f04babc12fb60366c24a22561c1d46895c80.tar.bz2 nixos-be06f04babc12fb60366c24a22561c1d46895c80.tar.xz nixos-be06f04babc12fb60366c24a22561c1d46895c80.zip | |
Merge commit 'bc90ef66' into flakes
Diffstat (limited to 'overlays')
| -rwxr-xr-x | overlays/worktime/worktime/__main__.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/overlays/worktime/worktime/__main__.py b/overlays/worktime/worktime/__main__.py index 0df226fa..21316182 100755 --- a/overlays/worktime/worktime/__main__.py +++ b/overlays/worktime/worktime/__main__.py | |||
| @@ -2,9 +2,9 @@ import requests | |||
| 2 | from requests.exceptions import HTTPError | 2 | from requests.exceptions import HTTPError |
| 3 | from requests.auth import HTTPBasicAuth | 3 | from requests.auth import HTTPBasicAuth |
| 4 | from datetime import * | 4 | from datetime import * |
| 5 | from xdg import (BaseDirectory) | 5 | from xdg import BaseDirectory |
| 6 | import toml | 6 | import toml |
| 7 | from uritools import uricompose | 7 | from uritools import (uricompose) |
| 8 | 8 | ||
| 9 | from dateutil.easter import * | 9 | from dateutil.easter import * |
| 10 | from dateutil.tz import * | 10 | from dateutil.tz import * |
| @@ -80,7 +80,7 @@ class TogglAPI(object): | |||
| 80 | max_time=10, | 80 | max_time=10, |
| 81 | ) | 81 | ) |
| 82 | def _raw_query(self, url, method): | 82 | def _raw_query(self, url, method): |
| 83 | headers = {'content-type': 'application/json'} | 83 | headers = {'content-type': 'application/json', 'accept': 'application/json'} |
| 84 | response = None | 84 | response = None |
| 85 | 85 | ||
| 86 | if method == 'GET': | 86 | if method == 'GET': |
| @@ -127,9 +127,9 @@ class TogglAPI(object): | |||
| 127 | pass | 127 | pass |
| 128 | 128 | ||
| 129 | entries = list() | 129 | entries = list() |
| 130 | params = { 'since': (req_start - timedelta(days=1)).astimezone(timezone.utc).isoformat(), | 130 | params = { 'since': (req_start - timedelta(days=1)).date().isoformat(), |
| 131 | 'until': (req_end + timedelta(days=1)).astimezone(timezone.utc).isoformat(), | 131 | 'until': (req_end + timedelta(days=1)).date().isoformat(), |
| 132 | 'rounding': rounding, | 132 | 'rounding': 'yes' if rounding else 'no', |
| 133 | 'billable': 'yes' | 133 | 'billable': 'yes' |
| 134 | } | 134 | } |
| 135 | if client_ids is not None: | 135 | if client_ids is not None: |
