Skip to content

Commit 0e43bf5

Browse files
[FEATURE] Resolve deprecation warning for datetime.datetime.utcnow (#94)
* [FEATURE] Resolve deprecation warning for datetime.datetime.utcnow * [DOCS] Bump python version and update Changelog
1 parent 428f502 commit 0e43bf5

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

ChangeLog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

8+
## [v0.3.11] - 2024-11-01
9+
### Fixed
10+
- Deprecation warning for `datetime.utcnow()`
11+
812
## [v0.3.10] - 2024-10-16
913
### Security
1014
- Bump certifi minimum version to 2024.07.04

learnosity_sdk/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = 'v0.3.10'
1+
__version__ = 'v0.3.11'

learnosity_sdk/request/init.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
def format_utc_time() -> str:
1414
"Get the current UTC time, formatted for a security timestamp"
15-
now = datetime.datetime.utcnow()
15+
now = datetime.datetime.now(datetime.timezone.utc)
1616
return now.strftime("%Y%m%d-%H%M")
1717

1818

0 commit comments

Comments
 (0)