Skip to content

Commit

Permalink
FIX: tz
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner committed Jan 16, 2024
1 parent fdd33c6 commit d28f63b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -1339,6 +1339,7 @@ def reset_warnings(gallery_conf, fname):
r"datetime\.datetime\.utcfromtimestamp",
# joblib
r"ast\.Num is deprecated",
r"Attribute n is deprecated and will be removed in Python 3\.14",
):
warnings.filterwarnings( # deal with other modules having bad imports
"ignore", message=".*%s.*" % key, category=DeprecationWarning
Expand Down
1 change: 1 addition & 0 deletions mne/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ def pytest_configure(config):
ignore:datetime.datetime.utcfromtimestamp.*:DeprecationWarning
# joblib
ignore:ast\.Num is deprecated.*:DeprecationWarning
ignore:Attribute n is deprecated and will be removed in Python 3\.14.*:DeprecationWarning
""" # noqa: E501
for warning_line in warning_lines.split("\n"):
warning_line = warning_line.strip()
Expand Down
3 changes: 1 addition & 2 deletions mne/export/_egimff.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ def export_evokeds_mff(fname, evoked, history=None, *, overwrite=False, verbose=
using MFF read functions.
"""
mffpy = _import_mffpy("Export evokeds to MFF.")
import pytz

info = evoked[0].info
if np.round(info["sfreq"]) != info["sfreq"]:
Expand All @@ -73,7 +72,7 @@ def export_evokeds_mff(fname, evoked, history=None, *, overwrite=False, verbose=
if op.exists(fname):
os.remove(fname) if op.isfile(fname) else shutil.rmtree(fname)
writer = mffpy.Writer(fname)
current_time = pytz.utc.localize(datetime.datetime.now(datetime.UTC))
current_time = datetime.datetime.now(datetime.UTC)
writer.addxml("fileInfo", recordTime=current_time)
try:
device = info["device_info"]["type"]
Expand Down

0 comments on commit d28f63b

Please sign in to comment.