Skip to content

Add working example of environment based time zones#73

Draft
emmuhamm wants to merge 3 commits into
developfrom
emmuhamm/timezones
Draft

Add working example of environment based time zones#73
emmuhamm wants to merge 3 commits into
developfrom
emmuhamm/timezones

Conversation

@emmuhamm
Copy link
Copy Markdown
Collaborator

@emmuhamm emmuhamm commented May 29, 2026

Description

Fix #70

WIP

Add better timezone handling. This is going to be optionally done by an environment variable, which overrides the log_format.ini settings.

If no environment variables exist, use log_format.ini.

TODO:

  • review the current implementation and see if youre happy with the structure of it
  • Figure out what the appropriate envrionment variable should be
  • how does one document this?

Type of change

  • New feature or enhancement (non-breaking change which adds functionality)
  • Optimization (non-breaking change that improves code/performance)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (whatever its nature)

Testing checklist

  • Unit tests pass (e.g. dbt-build --unittest)
  • Minimal system quicktest passes (pytest -s minimal_system_quick_test.py)
  • Full set of integration tests pass (dunedaq_integtest_bundle.sh)
  • Python tests pass if applicable (e.g. python -m pytest)
  • Pre-commit hooks run successfully if applicable (e.g. pre-commit run --all-files)

Comments here on the testing

Further checks

  • Code is commented where needed, particularly in hard-to-understand areas
  • Code style is correct (dbt-build --lint, and/or see https://dune-daq-sw.readthedocs.io/en/latest/packages/styleguide/)
  • If applicable, new tests have been added or an issue has been opened to tackle that in the future.
    (Indicate issue here: # (issue))

@emmuhamm emmuhamm self-assigned this May 29, 2026
@emmuhamm emmuhamm marked this pull request as draft May 29, 2026 14:00
@emmuhamm
Copy link
Copy Markdown
Collaborator Author

There appears to be a very stupid bug somewhere in the integ test..

Note in the following screenshots, when it is in UTC everything works well. But when its in some other time zone (eg bst) then it fails????

Obviously outside the purview of daqpytools, but it should at least still be investigated.

Screenshot 2026-05-29 at 15 50 05 Screenshot 2026-05-29 at 15 50 02 Screenshot 2026-05-29 at 15 49 55

@emmuhamm
Copy link
Copy Markdown
Collaborator Author

How to view timezones

In [40]: import pytz
In [41]: pytz.all_timezones

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Time zone defined in env variables

2 participants