From 34708fcf895cb527f8ddc8126d197d960a86644a Mon Sep 17 00:00:00 2001 From: ankraft Date: Fri, 28 Jun 2024 13:49:07 +0200 Subject: [PATCH] Fixed UTC time support for logging for the supported Python versions --- CHANGELOG.md | 10 +++++++++- README.md | 2 +- acme/etc/Constants.py | 2 +- acme/runtime/Logging.py | 4 ++-- setup.py | 2 +- 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 34a21687..4b83515d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Calendar Versioning](https://calver.org). -## [unreleased 2024.06] - 2024-06-26 + +## [2024.06.01] - 2024-06-28 + +### Fixed +- [CSE] Fixed support for UTC time logging for the supported Python versions. + + + +## [2024.06] - 2024-06-26 ### Added - [CSE] Added support for *operationMonitor* attribute in <subscription> resources. diff --git a/README.md b/README.md index 625b900b..39225323 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ # ACME oneM2M CSE An open source CSE Middleware for Education. -Version 2024.06 +Version 2024.06.01 [![oneM2M](https://img.shields.io/badge/oneM2M-f00)](https://www.onem2m.org) [![Python](https://img.shields.io/badge/Python-3.10-blue)](https://www.python.org) [![Maintenance](https://img.shields.io/badge/Maintained-Yes-52C82D.svg)](https://github.com/ankraft/ACME-oneM2M-CSE/graphs/commit-activity) [![License](https://img.shields.io/badge/License-BSD%203--Clause-52C82D)](LICENSE) ![MyPy](https://img.shields.io/badge/MyPy-covered-52C82D) [![](https://img.shields.io/pypi/v/acmecse)](https://pypi.org/project/acmecse/) [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/ankraft/ACME-oneM2M-CSE/main.yml?label=docs)](https://acmecse.net) diff --git a/acme/etc/Constants.py b/acme/etc/Constants.py index fe8980ec..89a9d564 100644 --- a/acme/etc/Constants.py +++ b/acme/etc/Constants.py @@ -11,7 +11,7 @@ class Constants(object): """ Various CSE and oneM2M constants """ - version = '2024.06' + version = '2024.06.01' """ ACME's release version """ logoColor = '#b42025' diff --git a/acme/runtime/Logging.py b/acme/runtime/Logging.py index 3b3127d6..84adb741 100644 --- a/acme/runtime/Logging.py +++ b/acme/runtime/Logging.py @@ -16,7 +16,7 @@ from typing import List, Any, Union, Optional, cast import traceback -import logging, logging.handlers, os, inspect, sys, datetime, dateutil.tz, time, threading +import logging, logging.handlers, os, inspect, sys, datetime, time, threading from queue import Queue from logging import LogRecord @@ -735,7 +735,7 @@ def __init__(self, level: int = logging.NOTSET) -> None: # Set the time conversion function, depending on the setting of UTC time if Logging.utcTime: - self._fromtimestamp = lambda t : datetime.datetime.fromtimestamp(t, tz=dateutil.tz.gettz('UTC')) + self._fromtimestamp = lambda t : datetime.datetime.fromtimestamp(t, tz=datetime.timezone.utc) else: self._fromtimestamp = datetime.datetime.fromtimestamp diff --git a/setup.py b/setup.py index 5a60c95b..6e8e7e48 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ setup( name='acmecse', - version='2024.06', + version='2024.06.01', author='Andreas Kraft',