Skip to content

Commit

Permalink
Merge branch 'jasmine-physical_cyrcadian_rhythm' of https://github.co…
Browse files Browse the repository at this point in the history
…m/onnela-lab/forest into jasmine-physical_cyrcadian_rhythm
  • Loading branch information
GeorgeEfstathiadis committed Oct 19, 2023
2 parents 82aa9b0 + a0039f9 commit 06c300e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions forest/oak/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,13 +497,17 @@ def run(study_folder: str, output_folder: str, tz_str: str = None,
date_start = date_start - timedelta(hours=date_start.hour)
else:
date_start = datetime.strptime(time_start, fmt)
date_start = date_start.replace(
tzinfo=from_zone
).astimezone(to_zone)
date_start = date_start - timedelta(hours=date_start.hour)

if time_end is None:
date_end = dates_shifted[-1]
date_end = date_end - timedelta(hours=date_end.hour)
else:
date_end = datetime.strptime(time_end, fmt)
date_end = date_end.replace(tzinfo=from_zone).astimezone(to_zone)
date_end = date_end - timedelta(hours=date_end.hour)

days = pd.date_range(date_start, date_end, freq='D')
Expand Down

0 comments on commit 06c300e

Please sign in to comment.