Skip to content

Commit

Permalink
Fixed UTC time support for logging for the supported Python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ankraft committed Jun 28, 2024
1 parent ef894b7 commit 34708fc
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion acme/etc/Constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions acme/runtime/Logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

setup(
name='acmecse',
version='2024.06',
version='2024.06.01',


author='Andreas Kraft',
Expand Down

0 comments on commit 34708fc

Please sign in to comment.