gyanz/pydsstools

Time Series reading dates incorrectly

Closed this issue · 2 comments

I'm having an issue reading the dates when I am reading a large file. I have a dss file with data at daily time step. I am using the read_ts function in the Open class. Whenever I try to read a window larger than 24,854 days long is when the issue occurs. The first 24,854 days are read with the correct time stamp. However, the next entry reverts to 1860-09-11 17:31:44. It doesn't matter where the start date and end date are in the record. As soon as the dataset being read is longer than 24,854 days, the timestamps will revert to 1860, and continue to progress daily from there. I am able to get around the issue by making my own datetime array manually, but I'm curious if anyone else has encountered this issue. I think it may have something to do with the HecTime or perhaps pytime?

gyanz commented

Thanks for reporting this issue @apreucil. This is a bug as you pointed out happens for large time window. I think the problem lies in the way I am calculating times attribute in the TimeSeriesStruct class.

gyanz commented

@apreucil The time value for regular time-series was stored as seconds. This caused overflow of int32 variable that stored each time value. The latest revision fixes this issue, thus, allowing reading of regular time-series with reasonably large time window.