Skip to content

Commit 512324a

Browse files
authored
Changes that hopefully solve this problem (#291)
* Changes that hopefully solve this problem * Add tzdata dependency for windows
1 parent 9029369 commit 512324a

3 files changed

Lines changed: 23 additions & 7 deletions

File tree

poetry.lock

Lines changed: 17 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "wristpy"
3-
version = "0.2.6"
3+
version = "0.2.7"
44
description = "wristpy is a Python package designed for processing and analyzing wrist-worn accelerometer data."
55
authors = [
66
"Adam Santorelli <adam.santorelli@childmind.org>",
@@ -25,6 +25,7 @@ pydantic-settings = "^2.3.4"
2525
scipy = "^1.14.1"
2626
typer = ">=0.20.0"
2727
rich = "^14.1.0"
28+
tzdata = "^2025.3"
2829

2930
[tool.poetry.group.dev.dependencies]
3031
pytest = "^8.0.0"

src/wristpy/io/readers/readers.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import datetime
44
import pathlib
5+
import zoneinfo
56
from typing import Literal, Union
67

78
import actfast
@@ -220,9 +221,11 @@ def _read_actigraph_csv(
220221
start_time = lines[2].strip().split()[-1]
221222
start_date = lines[3].strip().split()[-1]
222223

224+
ny_tz = zoneinfo.ZoneInfo("America/New_York")
223225
start_datetime = datetime.datetime.strptime(
224226
f"{start_date} {start_time}", "%d/%m/%Y %H:%M:%S"
225-
)
227+
).replace(tzinfo=ny_tz)
228+
226229
idle_sleep_mode_value = lines[4].strip().split()[-1]
227230
idle_sleep_mode_flag = idle_sleep_mode_value.lower() == "true"
228231
sampling_rate = int(lines[5].strip().split()[-1])

0 commit comments

Comments
 (0)