Level-as-Time-Series retrieval has overlapping times for non-UTC tz with small intervals
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 28
- Forks
- 25
- Avg merge
- 4d 22h
- Merged PRs (30d)
- 20
Description
Describe the bug
Using a non-UTC time zone with a small regular interval (<1hr) to retrieve levels as time series data results in overlapping times that cause issues downstream. These overlapping times occur on DST crossover points, suggesting DST is not being handled correctly. Most likely an issue with this method: https://github.com/USACE/cwms-data-api/blob/develop/cwms-data-api/src/main/java/cwms/cda/data/dao/LocationLevelsDaoImpl.java#L997
Expected behavior
Successful retrieval of data with non-UTC time zone and any regular interval.
To Reproduce
See https://github.com/USACE/cwms-data-api/pull/1605 for reproduction test.
CDA Version (please complete the following information):
Latest develop.
Additional context
Breaks within the AbstractRegularTimeSeries class of HCDA when times are checked to verify that they are increasing. This causes retrieval failure in projects using the HCDA level retrieval as time series method.
Contributor guide
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.
Research direction
Start with the retrieval method in cwms-data-api/src/main/java/cwms/cda/data/dao/LocationLevelsDaoImpl.java around line 997. Run or inspect the reproduction test linked from pull request 1605, then trace the failure in AbstractRegularTimeSeries when timestamps are checked. Done means non-UTC retrieval with sub-hour regular intervals no longer produces overlapping times at DST transitions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100