Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add leap second for Dec 2016 -> Jan 2017 #4141

Merged
merged 2 commits into from
Jul 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Change Log
* Added support in CZML for expressing `BillboardGraphics.alignedAxis` as the velocity vector of an entity, using `velocityReference` syntax.
* Normalizing the velocity vector produced by `VelocityVectorProperty` is now optional.
* Added optional `rangeMax` parameter to `Math.toSNorm` and `Math.fromSNorm`. [#4121](https://github.com/AnalyticalGraphicsInc/cesium/pull/4121)
* Added leap second just prior to Jan 2017. [#4092](https://github.com/AnalyticalGraphicsInc/cesium/issues/4092)

### 1.23 - 2016-07-01

Expand Down
3 changes: 2 additions & 1 deletion Source/Core/JulianDate.js
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,8 @@ define([
new LeapSecond(new JulianDate(2453736, 43233.0, TimeStandard.TAI), 33), // January 1, 2006 00:00:00 UTC
new LeapSecond(new JulianDate(2454832, 43234.0, TimeStandard.TAI), 34), // January 1, 2009 00:00:00 UTC
new LeapSecond(new JulianDate(2456109, 43235.0, TimeStandard.TAI), 35), // July 1, 2012 00:00:00 UTC
new LeapSecond(new JulianDate(2457204, 43236.0, TimeStandard.TAI), 36) // July 1, 2015 00:00:00 UTC
new LeapSecond(new JulianDate(2457204, 43236.0, TimeStandard.TAI), 36), // July 1, 2015 00:00:00 UTC
new LeapSecond(new JulianDate(2457754, 43237.0, TimeStandard.TAI), 37) // January 1, 2017 00:00:00 UTC
];

return JulianDate;
Expand Down
10 changes: 5 additions & 5 deletions Specs/Core/JulianDateSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ defineSuite([
var date = new Date('December 31, 2021 18:00:00 UTC');
var julianDate = JulianDate.fromDate(date);
expect(julianDate.dayNumber).toEqual(2459580);
expect(julianDate.secondsOfDay).toEqual(21636);
expect(julianDate.secondsOfDay).toEqual(21637);
});

it('Construct a date from a JavaScript Date (4)', function() {
Expand All @@ -149,7 +149,7 @@ defineSuite([
var jsDate = new Date('11/17/2039 12:00:00 AM UTC');
var julianDate = JulianDate.fromDate(jsDate);
expect(julianDate.dayNumber).toEqual(2466109);
expect(julianDate.secondsOfDay).toEqual(43236);
expect(julianDate.secondsOfDay).toEqual(43237);
});

it('Fail to construct from an undefined JavaScript Date', function() {
Expand Down Expand Up @@ -724,7 +724,7 @@ defineSuite([

it('toDate works on date later than all leap seconds', function() {
var expectedDate = new Date('11/17/2039 12:00:00 AM UTC');
var date = JulianDate.toDate(new JulianDate(2466109, 43236.0, TimeStandard.TAI));
var date = JulianDate.toDate(new JulianDate(2466109, 43237.0, TimeStandard.TAI));
expect(date).toEqual(expectedDate);
});

Expand Down Expand Up @@ -1036,7 +1036,7 @@ defineSuite([
});

it('computeTaiMinusUtc works after all leap seconds', function() {
var date = new JulianDate(2556109, 43236.0, TimeStandard.TAI);
expect(JulianDate.computeTaiMinusUtc(date)).toEqual(36);
var date = new JulianDate(2556109, 43237.0, TimeStandard.TAI);
expect(JulianDate.computeTaiMinusUtc(date)).toEqual(37);
});
});