Feature #379

Leap seconds

Added by Eduardo almost 4 years ago. Updated almost 4 years ago.

Status:FeedbackStart date:2013-09-28
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:Candidate for next minor release
Platform:Linux

Description

There exist a TIME_LEAP_SECOND in GMT_Docs but it isn't an entry in man gmt.conf.
Furthermore gmtmath doesn't seem handling leap seconds

gmt gmtmath -Q -fo0f 1999-01-01T00:01.00 1998-12-31T00:01.00 SUB =
86400

gmt gmtmath -Q -fo0f 1999-01-01T00:01.00 1998-12-31T00:01.00 SUB = --TIME_LEAP_SECONDS=1
86400

gmt gmtmath -Q -fo0f 1999-01-01T00:01.00 1998-12-31T00:01.00 SUB = --TIME_LEAP_SECONDS=0
86400

gmt gmtmath -Q -fo0f 1999-01-01T00:01.00 1998-12-31T00:01.00 SUB = --TIME_LEAP_SECONDS=T
86400

gmt gmtmath -Q -fo0f 1999-01-01T00:01.00 1998-12-31T00:01.00 SUB = --TIME_LEAP_SECONDS=F
86400

Associated revisions

Revision 12214
Added by Paul almost 4 years ago

Add comment on leap second as explained in issue #379

History

#1 Updated by Paul almost 4 years ago

  • Status changed from New to Feedback

Way back we made provisions for dealing with leap seconds. The idea was to consult a remote file somewhere (e.g., http://maia.usno.navy.mil/ser7/tai-utc.dat) that will change over time and if TIME_LEAP_SECONDS = true we would insert the missing seconds. However, as nobody among us needed this for their own research it was left there for future implementation. If we were to honor that true/false flag we will have to make these changes, I think:

  1. After converting a date to time since epoch, add cumulative leap seconds from 1968 to the given date.
  2. Likewise, after reading time since epoch, subtract cumulative leap seconds from 1968 to the given time, then format date.
  3. Recognize that some special minutes every few years will have 61 seconds, and format hh:mm:ss.xxx accordingly there. Likewise, hh:mm:60 is valid input for those few special minutes (currently 39).

All of this is quite a bit of work and requires motivation. Both Walter and Remko deal with satellites where these seconds are important, so maybe this could happen. For now, I have added this caveat after the list in GMT_Docs that actually mentions TIME_LEAP_SECONDS:

Note: While TIME_LEAP_SECONDS is a recognized keyword it is
currently not implemented and has no effect. We reserve the right
to enable this feature in the future.

#2 Updated by Paul almost 4 years ago

  • Tracker changed from Bug to Feature

I am changing this from bug to feature request since leap seconds has not been implemented.

#3 Updated by Florian almost 4 years ago

  • Target version changed from 5.1.0 to Candidate for next minor release

Also available in: Atom PDF