Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Conversation

@Powlinett
Copy link
Member

Proposed changes

  • replace datetime.utcnow() with datetime.now(tz=timezone.utc)

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality

Further comments

Quick fix to avoid errors during logging on a sys.exit() signal. A global rework of the AppLogger will be done soon.

@Powlinett Powlinett self-assigned this Feb 11, 2025
@Powlinett Powlinett added the filigran team use to identify PR from the Filigran team label Feb 11, 2025
Copy link
Contributor

@flavienSindou flavienSindou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this update about the datetime handling !

now = datetime.datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%S.%fZ")
log_record["timestamp"] = now
now = datetime.now(tz=timezone.utc)
log_record["timestamp"] = now.strftime("%Y-%m-%dT%H:%M:%S.%fZ")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
log_record["timestamp"] = now.strftime("%Y-%m-%dT%H:%M:%S.%fZ")
log_record["timestamp"] = now.isoformat()

@labo-flg labo-flg merged commit f372343 into master Feb 17, 2025
6 checks passed
@labo-flg labo-flg deleted the connector/issue/3334 branch February 17, 2025 08:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

filigran team use to identify PR from the Filigran team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants