Skip to content

Commit

Permalink
[FEATURE] Resolve deprecation warning for datetime.datetime.utcnow (#94)
Browse files Browse the repository at this point in the history
* [FEATURE] Resolve deprecation warning for datetime.datetime.utcnow

* [DOCS] Bump python version and update Changelog
  • Loading branch information
ferdia-sopermaccafraidh-lrn authored Nov 1, 2024
1 parent 428f502 commit 0e43bf5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [v0.3.11] - 2024-11-01
### Fixed
- Deprecation warning for `datetime.utcnow()`

## [v0.3.10] - 2024-10-16
### Security
- Bump certifi minimum version to 2024.07.04
Expand Down
2 changes: 1 addition & 1 deletion learnosity_sdk/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = 'v0.3.10'
__version__ = 'v0.3.11'
2 changes: 1 addition & 1 deletion learnosity_sdk/request/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

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


Expand Down

0 comments on commit 0e43bf5

Please sign in to comment.