Skip to content

Commit

Permalink
Formatting datetime using format code
Browse files Browse the repository at this point in the history
  • Loading branch information
aadel committed Jul 22, 2024
1 parent 7add258 commit 20fb56e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sqlalchemy_solr/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def datetime_str(self, dt) -> str:
if dt == "*":
return dt

return dt.isoformat() + "Z"
return dt.strftime("%Y-%m-%dT%H:%M:%SZ") # Assuming UTC time supplied


class SolrIdentifierPreparer(compiler.IdentifierPreparer):
Expand Down

0 comments on commit 20fb56e

Please sign in to comment.