ISISComputingGroup / ISISComputingGroup/IBEX
[Block Server/DB Server]: Incorrect Event Time - Probably only during DST
- Dominant language
- No language data
- Stars
- 6
- Forks
- 2
- Avg merge
- 16h 40m
- Merged PRs (30d)
- 2
Description
As a scientist, I would like to see the event time in the IOC messages reflecting the right time of occurrence of the event. But for messages coming from Block Server or DB Server, while the DST is on, I see that the event time is 1 hour in advance to current/create time.
### How & Where?
- The issue can be seen in IBEX Gui and the database
- We have verified that the issue isn't coming for IOCs that are using the C based log generator. Those are making appropriate offset corrections.
- We have also verified that the components that are using python to generate the logs have the issue.
- The java side of the code seems clean. The Joda time parser expects that the time elements come with the correct ISO standard format. In the case of time values during DST, these are supposed to have the offset as part of the value, but in the erroneous case they are coming with "Z" with implies zero offset. The Z, tells Joda that the value hasn't been adjusted and so it 'corrects' it by the expected DST offset, on the other hand, presence of an offset tells Joda that the value has already been adjusted by the offset provided within the value.
From the Database



From IBEX GUI

Correctly generate message

Incorrectly generated message

### Reproducible (Yes/No)?
Yes
If yes, describe step-by-step how to reproduce the issue.
1. Start the IBEX server
2. Start the IBEX GUI
3. Check the messages in IBEX GUI/MySQL DB.
### Additional Information
What else do I need to know before starting?
- isis_logger.py (function _queued_write_to_log) in C:\Instrument\Apps\EPICS\ISIS\inst_servers\master\server_common\loggers is probably responsible for generating the XML messages.
- Check write_to_log in isis_logger.py, this is where the time event time is generated.
- See the snap below. We are using isoformat without mentioning the timezone, so the offset isn't generated. This is most likely the root cause of the issue

_If not applicable, write "Not applicable"_
[comment]: <> (FILL IN BELOW)
> ...
See our [Git Workflow](https://github.com/ISISComputingGroup/ibex_developers_manual/wiki/Git-workflow#development-work).
# Acceptance Criteria
What is the acceptance criteria of this ticket? What should the reviewer expect to be complete?
- The event time in the message log should reflect the real time and not a time in future.
- The corrected time should be visible in MySQL DB and Ibex GUI
# How to Review
**To the reviewer: Make sure to [update submodules](https://github.com/ISISComputingGroup/ibex_developers_manual/wiki/Git-workflow#reviewing-work-for-the-submodules-of-epics)!**
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.