Orange-OpenSource / Orange-OpenSource/its-client

python/mobility: UNIX <-> ETSI time conversion broken when local timezone is not UTC

Open
#584 2 comments 0 reactions 1 assignee View on GitHub

@ymorin-orange is already working on this.

Since Aug 18, 2026.

Python
Dominant language
Java
Stars
19
Forks
12
Avg merge
6d 8h
Merged PRs (30d)
3

Description

What:

When the lcoal timezone is not UTC, conversion between UNIX and ETSI time and back, is broken.

For eaxmple, assuming Europe/Paris (CEST, GMT+0200) as the local timezone:

>>> from iot3.mobility.etsi import ETSI
>>> unix_now = time.time()
>>> etsi_now = ETSI.unix2etsi_time(unix_now)
>>> new_now = ETSI.etsi2unix_time(etsi_now)
>>> print(new_now - unix_now)
14399.999512434006

The delta is (almopst exactly) 4 hours, which is twixe the offset to GMT.


Expected:

The conversion properly handles the local timezone.

Most proobably, the culprit is commit a707109a49e2eb01e9bd923dfc9fd495c3ca2622 (python/iot3/mobility: compliance with python 3.12), which improperly converts from a timezone-aware to a naive datetime object.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.