Issue with reading data dated to 31 Mar from IAGA-2002 files (Mac OS)
teraita opened this issue · 5 comments
When reading the data to the 1min values there is issue with handling of the data of 31 March. The file is not read correctly between 03-05UT. When manipulating the date information in filename, and data row (detestr and doy) in IAGA-2002 format to respond 31 Jan the file works. Might be some issue with epoch/ stream lengths?
Problem sees to hit only to period 03-05UT:
Same data file, date information manipulated:
When merging XYZ and F of the date and calculating deltaF the values are corrupted, so it this not only visualisation problem in MagPy.
Is this only Mac related issue?
Please, request data samples, if needed.
Well.... something I dont really understand: I am testing for leap seconds within the method LeapSeconds of stream.py. I am using the following conversion which actually should work fine in order to get a datetime compatible output:
t = "2019-03-31T02:00:00"
ti = time.strptime(t, "%Y-%m-%dT%H:%M:%S")
tim = datetime.fromtimestamp(time.mktime(ti))
tim, however, then results in 2019-03-31T03:00:00 which is obviously wrong. Wrong results are apparently only obtained on March 31, 2019 between 2:00 and 3:00.
Workaround:
tim = datetime(*ti[:5]+(min(ti[5], 59),))