Skip to content

Commit

Permalink
Merge pull request #836 from NeurodataWithoutBorders/timezone-issue-fix
Browse files Browse the repository at this point in the history
Fix atomic Inspector time zone issue
  • Loading branch information
CodyCBakerPhD authored Jun 5, 2024
2 parents fcd7415 + 37b025e commit 1df0e8d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "nwb-guide",
"productName": "NWB GUIDE",
"version": "0.0.16",
"version": "1.0.0",
"description": "NWB GUIDE is a desktop app that provides a no-code user interface for converting neurophysiology data to NWB.",
"main": "./build/main/index.js",
"engine": {
Expand Down
5 changes: 2 additions & 3 deletions src/pyflask/manageNeuroconv/manage_neuroconv.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ def validate_subject_metadata(
subject_metadata["date_of_birth"] = datetime.fromisoformat(subject_metadata["date_of_birth"])
if timezone is not None:
subject_metadata["date_of_birth"] = subject_metadata["date_of_birth"].replace(
tzinfo=pytz.timezone(timezone)
tzinfo=zoneinfo.ZoneInfo(timezone)
)

return run_check_function(check_function, Subject(**subject_metadata))
Expand All @@ -672,7 +672,6 @@ def validate_nwbfile_metadata(
nwbfile_metadata: dict, check_function_name: str, timezone: Optional[str] = None
): # -> Union[None, InspectorMessage, List[InspectorMessage]]:
"""Function used to validate NWBFile metadata."""
import pytz
from pynwb.testing.mock.file import mock_NWBFile

check_function = get_check_function(check_function_name)
Expand All @@ -681,7 +680,7 @@ def validate_nwbfile_metadata(
nwbfile_metadata["session_start_time"] = datetime.fromisoformat(nwbfile_metadata["session_start_time"])
if timezone is not None:
nwbfile_metadata["session_start_time"] = nwbfile_metadata["session_start_time"].replace(
tzinfo=pytz.timezone(timezone)
tzinfo=zoneinfo.ZoneInfo(timezone)
)

return run_check_function(check_function, mock_NWBFile(**nwbfile_metadata))
Expand Down

0 comments on commit 1df0e8d

Please sign in to comment.