Skip to content

Commit

Permalink
Use backward compatible datetime.timezone.utc
Browse files Browse the repository at this point in the history
  • Loading branch information
kislyuk committed Aug 11, 2024
1 parent 45b93bc commit fd3a041
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion signxml/xades/xades.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def _add_reference_to_signed_info(self, sig_root, node_to_reference, **attrs):
def add_signing_time(self, signed_signature_properties, sig_root, signing_settings: SigningSettings):
signing_time = SubElement(signed_signature_properties, xades_tag("SigningTime"), nsmap=self.namespaces)
# TODO: make configurable
utc_iso_ts = datetime.datetime.now(datetime.UTC).isoformat(timespec="seconds")
utc_iso_ts = datetime.datetime.now(datetime.timezone.utc).isoformat(timespec="seconds")
signing_time.text = f"{utc_iso_ts}+00:00"

def add_signing_certificate(self, signed_signature_properties, sig_root, signing_settings: SigningSettings):
Expand Down

0 comments on commit fd3a041

Please sign in to comment.