[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orekit Users] June 2012 Leap Second
- To: orekit-users@orekit.org
- Subject: [Orekit Users] June 2012 Leap Second
- From: Matt Edwards <matt.edwards.issinc@gmail.com>
- Date: Tue, 19 Jun 2012 11:25:30 -0600
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=3FGTHESZURxYjjSZ/T56UUE/w1s4LJqVxHlFITmBq1c=; b=XhZHZKdT3L5I9avoViC3cU73pi42QG9ZjregGvKmG/NBddMsAXJrPoyjWBI0h8TME2 xj20v/oqqLmt7hqn4ffDpCiExeIsRhT2eIQe9RDd9TyIxnwkFd4d08RExo2Ke+yjSGAA MlC/NUy0rNmAtaCKudjRVg8fAZiDTjLCtmb3jTWspcULIbMLWiyJSFOA+GtDTioo+81C G2WmBTTmF9psrvCgPtNxG0BXGoRgeBWDW7JA5eLVVXGiGZVfGmTybQVjM6A1dT0g6IE+ l5N7/tc/9ys7Ge9AROLp6W4Nd4dAusW6884C8cwW3JPrxRZbnxvZDrT9osK7haIaXTWh kI3w==
Hello,
I am trying to verify if the upcoming leap second has been added into the
toolkit or not. I am currently using jar 5.0.3 in my project and am not seeing
proper functionality.
I have:
UTCScale utcScale = TimeScalesFactory.getUTC();
String date = "2012-07-01T00:00:00.000";
AbsoluteDate ad = new AbsoluteDate(date, utcScale);
AbsoluteDate base = new AbsoluteDate(2012, 06, 30, 23, 59, 59.0, utcScale);
System.out.println("UTC offset from TAI:" + utcScale.offsetFromTAI(base));
System.out.println("UTC offset from TAI:" + utcScale.offsetFromTAI(ad));
System.out.println("Duration: " + ad.durationFrom(base));
prints:
UTC offset from TAI:-34.0
UTC offset from TAI:-34.0
Duration: 1.0
This code prints a difference of -34.0 seconds. However there will be a Leap
Second added at the end of June 2012 resulting that the proper answer is -35
seconds. and a Duration of 2seconds between these dates.
The dates should function as per this link
ftp://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat
2012 June 30, 23h 59m 59s
2012 June 30, 23h 59m 60s
2012 July 1, 0h 0m 0s
If I have something flawed in my approach please let me know. Or if there will
be a new release prior to the end of the month, I will grab the update then.
Regards,
Matt E.