ga-api-client 0.3.5__tar.gz → 0.3.6__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.
Files changed (20) hide show
  1. {ga_api_client-0.3.5/ga_api_client.egg-info → ga_api_client-0.3.6}/PKG-INFO +1 -1
  2. {ga_api_client-0.3.5 → ga_api_client-0.3.6}/ga_api/capture.py +2 -1
  3. {ga_api_client-0.3.5 → ga_api_client-0.3.6}/ga_api/rate.py +4 -3
  4. {ga_api_client-0.3.5 → ga_api_client-0.3.6/ga_api_client.egg-info}/PKG-INFO +1 -1
  5. {ga_api_client-0.3.5 → ga_api_client-0.3.6}/setup.cfg +1 -1
  6. {ga_api_client-0.3.5 → ga_api_client-0.3.6}/LICENSE +0 -0
  7. {ga_api_client-0.3.5 → ga_api_client-0.3.6}/README.md +0 -0
  8. {ga_api_client-0.3.5 → ga_api_client-0.3.6}/ga_api/__init__.py +0 -0
  9. {ga_api_client-0.3.5 → ga_api_client-0.3.6}/ga_api/average.py +0 -0
  10. {ga_api_client-0.3.5 → ga_api_client-0.3.6}/ga_api/field_tree.py +0 -0
  11. {ga_api_client-0.3.5 → ga_api_client-0.3.6}/ga_api/ga_api_client.py +0 -0
  12. {ga_api_client-0.3.5 → ga_api_client-0.3.6}/ga_api/hyper_log_log.py +0 -0
  13. {ga_api_client-0.3.5 → ga_api_client-0.3.6}/ga_api/std.py +0 -0
  14. {ga_api_client-0.3.5 → ga_api_client-0.3.6}/ga_api/tdigest.py +0 -0
  15. {ga_api_client-0.3.5 → ga_api_client-0.3.6}/ga_api_client.egg-info/SOURCES.txt +0 -0
  16. {ga_api_client-0.3.5 → ga_api_client-0.3.6}/ga_api_client.egg-info/dependency_links.txt +0 -0
  17. {ga_api_client-0.3.5 → ga_api_client-0.3.6}/ga_api_client.egg-info/requires.txt +0 -0
  18. {ga_api_client-0.3.5 → ga_api_client-0.3.6}/ga_api_client.egg-info/top_level.txt +0 -0
  19. {ga_api_client-0.3.5 → ga_api_client-0.3.6}/pyproject.toml +0 -0
  20. {ga_api_client-0.3.5 → ga_api_client-0.3.6}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ga-api-client
3
- Version: 0.3.5
3
+ Version: 0.3.6
4
4
  Classifier: Programming Language :: Python :: 3
5
5
  Classifier: License :: OSI Approved :: MIT License
6
6
  Classifier: Operating System :: OS Independent
@@ -21,7 +21,8 @@ class CaptureBase:
21
21
  def _parse_datetime(self, date_str):
22
22
  if isinstance(date_str, str) and date_str.startswith('d:'):
23
23
  try:
24
- return datetime.fromisoformat(date_str[2:])
24
+ dt = datetime.strptime(date_str[2:-1], "%Y-%m-%dT%H:%M:%S.%f")
25
+ return dt.replace(tzinfo=timezone.utc)
25
26
  except ValueError as e:
26
27
  raise ValueError(f"Invalid datetime format: {date_str}") from e
27
28
  return date_str
@@ -6,10 +6,11 @@ class Rate:
6
6
  self._start_ms = arg[1]
7
7
  self._end_ms = arg[2]
8
8
  if (isinstance(self._start_ms, str) and self._start_ms.startswith('d:')):
9
- self._start_ms = datetime.fromisoformat(self._start_ms[2:]).timestamp() * 1000
9
+ dt = datetime.strptime(self._start_ms[2:-1], "%Y-%m-%dT%H:%M:%S.%f")
10
+ self._start_ms = dt.replace(tzinfo=timezone.utc).timestamp() * 1000
10
11
  if (isinstance(self._end_ms, str) and self._end_ms.startswith('d:')):
11
- self._end_ms = datetime.fromisoformat(self._end_ms[2:]).timestamp() * 1000
12
-
12
+ dt = datetime.strptime(self._end_ms[2:-1], "%Y-%m-%dT%H:%M:%S.%f")
13
+ self._end_ms = dt.replace(tzinfo=timezone.utc).timestamp() * 1000
13
14
  def __add__(self, other):
14
15
  first = self._start_ms if self._start_ms < other._start_ms else other._start_ms
15
16
  last = self._end_ms if self._end_ms > other._end_ms else other._end_ms
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ga-api-client
3
- Version: 0.3.5
3
+ Version: 0.3.6
4
4
  Classifier: Programming Language :: Python :: 3
5
5
  Classifier: License :: OSI Approved :: MIT License
6
6
  Classifier: Operating System :: OS Independent
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = ga-api-client
3
- version = 0.3.5
3
+ version = 0.3.6
4
4
  long_description = file: README.md
5
5
  long_description_content_type = text/markdown
6
6
  classifiers =
File without changes
File without changes
File without changes