OED wanted to import data exported from another readings collection tool. This data reflected local time including shifts for daylight savings (DST) but does not have time zone information, e.g., 2024-01-01 00:00:00 instead of 2024-01-01 00:00:00-05:00. OED expects time zone information when honoring DST to determine when a pair of readings cross DST. This PR adds a switch named useMeterZone where the zone associated with the meter (or site then server if no meter info in standard OED fashion) is added to each reading. This allows OED to detect DST crossing into DST but there are issues leaving DST (see below). This PR allows the data to be imported but isn't perfect. It appears to work fine as long as the readings align with the DST zone. For example, 15 minute data starting on the hour is fine. However, readings off the hour, e.g., at 5, 20, 35 & 50 min of each hour, would overlap the DST zone and probably cause issues. This PR only enables this ability with curl commands (see below).
In addition, the following changes were made:
The pipeline reading validation messages were updated to be clearer.
Git now ignores the src/server/tmp/ directory as it is only intended for temporary files.
Type of change
[ ] Note merging this changes the database configuration.
[x] I have removed text in ( ) from the issue request
[x] You acknowledge that every person contributing to this work has signed the OED Contributing License Agreement and each author is listed in the Description section.
Limitations
Even though the code has the limitations stated above, it is still useful in some cases. Thus, it is proposed to add to OED. The PR contains all the code for allowing the useMeterZone on the CSV reading import page but the actual checkbox is commented out so it is not available. This was done due to limitations at this time so it cannot easily be used but is available for scripts and manual uploads. This could easily be undone in the future by uncommenting the checkbox and this code was tested during development.
There are no automated test included. They should be added if this becomes a used feature.
Description
OED wanted to import data exported from another readings collection tool. This data reflected local time including shifts for daylight savings (DST) but does not have time zone information, e.g., 2024-01-01 00:00:00 instead of 2024-01-01 00:00:00-05:00. OED expects time zone information when honoring DST to determine when a pair of readings cross DST. This PR adds a switch named useMeterZone where the zone associated with the meter (or site then server if no meter info in standard OED fashion) is added to each reading. This allows OED to detect DST crossing into DST but there are issues leaving DST (see below). This PR allows the data to be imported but isn't perfect. It appears to work fine as long as the readings align with the DST zone. For example, 15 minute data starting on the hour is fine. However, readings off the hour, e.g., at 5, 20, 35 & 50 min of each hour, would overlap the DST zone and probably cause issues. This PR only enables this ability with curl commands (see below).
In addition, the following changes were made:
Type of change
Checklist
Limitations
Even though the code has the limitations stated above, it is still useful in some cases. Thus, it is proposed to add to OED. The PR contains all the code for allowing the useMeterZone on the CSV reading import page but the actual checkbox is commented out so it is not available. This was done due to limitations at this time so it cannot easily be used but is available for scripts and manual uploads. This could easily be undone in the future by uncommenting the checkbox and this code was tested during development.
There are no automated test included. They should be added if this becomes a used feature.