Skip to content

Commit

Permalink
object does not mutate
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyCBakerPhD committed Jun 4, 2024
1 parent b440644 commit 5f948c9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pyflask/manageNeuroconv/manage_neuroconv.py
Original file line number Diff line number Diff line change
Expand Up @@ -992,9 +992,10 @@ def update_conversion_progress(message):
del ecephys_metadata["ElectrodeColumns"]

# Correct timezone in metadata fields
resolved_metadata["NWBFile"]["session_start_time"].replace(tzinfo=zoneinfo.ZoneInfo(info["timezone"]))
resolved_metadata["NWBFile"]["session_start_time"] = resolved_metadata["NWBFile"][
"session_start_time"].replace(tzinfo=zoneinfo.ZoneInfo(info["timezone"]))
if "date_of_birth" in resolved_metadata["Subject"]:
resolved_metadata["Subject"]["date_of_birth"].replace(tzinfo=zoneinfo.ZoneInfo(info["timezone"]))
resolved_metadata["Subject"]["date_of_birth"] = resolved_metadata["Subject"]["date_of_birth"].replace(tzinfo=zoneinfo.ZoneInfo(info["timezone"]))

# Actually run the conversion
converter.run_conversion(
Expand Down

0 comments on commit 5f948c9

Please sign in to comment.