[Dachs-support] question about leap seconds

Baptiste Cecconi baptiste.cecconi at obspm.fr
Mon Feb 7 15:05:52 CET 2022


Dear DaCHS-gurus, 

While I'm trying to import data into a table, I'm tumbling on a leap-second issue (I guess). 

My <rowmaker> element contains: 
>                                 <map key="time_end">parseISODT(@time_end)</map>

and the ISO date time I'm sending to the rowmaker is 
> time_end = '2016-12-31T23:59:60.000'

I get the error: 
> Field time_end: While building time_end in make_louis_juno_waves:
> second must be in 0..59

As a matter of fact, this ISO date is correct, since there was a leap second inserted at this time. This means that the last second of year 2016 is indeed '2016-12-31T23:59:60.000'. 

I could update my import script with a dirty hack to forget the leap seconds when they occur. This would mean that I would implement leap second support in each q.rd when I need it. 

By the way, with the current DaCHS implementation, I wonder what would be the result of :

parseISODT("2017-01-01T00:00:00.000") - parseISODT("2016-12-31T23:59:59.000")  

Would is be 1 or 2 seconds ? 

Baptiste
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.g-vo.org/pipermail/dachs-support/attachments/20220207/6c9693ad/attachment.htm>


More information about the Dachs-support mailing list