pyvikunja 0.18__tar.gz → 0.19__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyvikunja
3
- Version: 0.18
3
+ Version: 0.19
4
4
  Summary: A Python wrapper for Vikunja API
5
5
  Author: Joseph Shufflebotham
6
6
  License: AGPL
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pyvikunja"
7
- version = "0.18"
7
+ version = "0.19"
8
8
  description = "A Python wrapper for Vikunja API"
9
9
  authors = [
10
10
  {name = "Joseph Shufflebotham"}
@@ -1,4 +1,4 @@
1
- from datetime import datetime
1
+ from datetime import datetime, timezone
2
2
  from typing import Optional, Dict
3
3
 
4
4
 
@@ -15,10 +15,13 @@ class BaseModel:
15
15
  date = datetime.fromisoformat(date_str.rstrip('Z'))
16
16
  epoch_seconds = int(date.timestamp())
17
17
 
18
+ utc_time = date.replace(tzinfo=timezone.utc)
19
+ local_time = utc_time.astimezone()
20
+
18
21
  if epoch_seconds == 0:
19
22
  return None
20
23
  else:
21
- return date
24
+ return local_time
22
25
  except ValueError as e:
23
26
  return None
24
27
  return None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyvikunja
3
- Version: 0.18
3
+ Version: 0.19
4
4
  Summary: A Python wrapper for Vikunja API
5
5
  Author: Joseph Shufflebotham
6
6
  License: AGPL
File without changes
File without changes
File without changes
File without changes
File without changes