diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-05-16 07:19:42 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-16 07:19:42 +0200 |
| commit | 9808b07bc5073f26b329f7fbf6b20e374ded1533 (patch) | |
| tree | b6ecae0e9daed0f07b4eb7d28e3b4f43f6641302 /compiler/rustc_parse/src | |
| parent | e53b9f8fdd7be3357063cc82abe9a12f9014c13f (diff) | |
| parent | 754b06f97869253968e0d6abf8105d047c327b62 (diff) | |
| download | rust-9808b07bc5073f26b329f7fbf6b20e374ded1533.tar.gz rust-9808b07bc5073f26b329f7fbf6b20e374ded1533.zip | |
Rollup merge of #141009 - emmanuel-ferdman:master, r=marcoieni
Migrate to modern datetime API # PR Summary This small PR resolves the `datetime` library warnings: ```python DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC). or datetime.datetime.utcnow() ``` Note that `.replace(tzinfo=None)` allows to keep the original behavior where the time appears as a naive UTC timestamp (i.e., without any timezone offset). Comparision: ```python # With .utcnow() or .now(datetime.timezone.utc).replace(tzinfo=None) Time,Idle 2025-05-14T15:40:25.013414,98.73417721518987 # With .now(datetime.timezone.utc) Time,Idle 2025-05-14T15:40:25.013414+00:00,98.73417721518987 ```
Diffstat (limited to 'compiler/rustc_parse/src')
0 files changed, 0 insertions, 0 deletions
