Skip to content

Commit

Permalink
chore: use milliseconds when avaiable for filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
lorransr committed Mar 12, 2024
1 parent ab0937c commit 21d7b77
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tap_superset/client_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def update_dict_with(
def get_start_timestamp(timestamp):
if timestamp:
start_timestamp = datetime.fromisoformat(timestamp)
start_timestamp = start_timestamp.strftime("%Y-%m-%d %H:%M:%S")
start_timestamp = start_timestamp.strftime("%Y-%m-%d %H:%M:%S.%f")
return start_timestamp
else:
return None
4 changes: 2 additions & 2 deletions tests/test_client_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ def test_update_dict_with():


def test_get_start_timestamp():
input = "2023-02-10T00:00:00Z"
expected = "2023-02-10 00:00:00"
input = "2022-05-10T19:57:35.680477"
expected = "2022-05-10 19:57:35.680477"
result = get_start_timestamp(input)
assert result == expected

Expand Down

0 comments on commit 21d7b77

Please sign in to comment.