Skip to content

Commit

Permalink
Changed start time to local system based
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Hui committed Mar 26, 2023
1 parent 77e0aab commit 37de486
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,11 @@ def test_add_files_timezone(single_mission: Tuple[Mock, DataManager, Path],
"""
mock, _, _ = single_mission
data_dir, n_files, _ = test_data
local_tz = dt.datetime.now().astimezone().tzinfo
sleep(1)
start_time = dt.datetime.now(tz=local_tz)

args = split(f'e4edm add --start 2023-03-25T17:18-07:00 {data_dir.as_posix()}/*')
args = split(f'e4edm add --start {start_time.isoformat()} {data_dir.as_posix()}/*')
with patch('sys.argv', args):
main()
expected_files = [data_dir.joinpath(f'{i:04d}.bin') for i in range(n_files)]
Expand Down

0 comments on commit 37de486

Please sign in to comment.