Orange-OpenSource / Orange-OpenSource/its-client
python/mobility: UNIX <-> ETSI time conversion broken when local timezone is not UTC
@ymorin-orange is already working on this.
Since Aug 18, 2026.
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.