Skip to content

Commit

Permalink
Merge pull request #709 from xylar/fix-dynamic-adjustment
Browse files Browse the repository at this point in the history
Fix dynamic adjustment time parsing for OSX
  • Loading branch information
xylar authored Sep 29, 2023
2 parents dc381b5 + 42bed57 commit 8a86b11
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import glob
import importlib.resources
import os
import platform
from datetime import datetime, timedelta

import xarray as xr
Expand Down Expand Up @@ -217,7 +218,10 @@ def _get_restart_time(start_time, run_duration):
start = datetime.strptime(start_time, '%Y-%m-%d_%H:%M:%S')
duration = _parse_duration(run_duration)
restart = start + duration
restart_time = restart.strftime('%4Y-%m-%d_%H:%M:%S')
if platform.system() == 'Darwin':
restart_time = restart.strftime('%Y-%m-%d_%H:%M:%S')
else:
restart_time = restart.strftime('%4Y-%m-%d_%H:%M:%S')
return restart_time


Expand Down

0 comments on commit 8a86b11

Please sign in to comment.