Epoch J2000 and Julian Date

I’m trying to match up Cesium’s time with a planet orbiting library, so I made a sandcastle to help understand Cesium’s time system.

var viewer = new Cesium.Viewer("cesiumContainer");
var someTime = "2000-01-01T11:59:28Z";

var myJuli = Cesium.JulianDate.fromDate(new Date(someTime));
//{dayNumber: 2451545, secondsOfDay: 0}

var myGreg = Cesium.JulianDate.toGregorianDate(myJuli);
//year: 2000, month: 1, day: 1, hour: 11, minute: 59, second: 28

var gregTOjuli = Cesium.JulianDate.fromGregorianDate(myGreg);
//{dayNumber: 2451545, secondsOfDay: 0}

According to the website, it would appear that the conversion occurring is between
International Atomic Time and Julian time, not between Gregorian time and Julian, because 11:59:28 is matching up with Julian 0 secondsOfDay. This is fine if this is the case, but if it is perhaps the methods should be renamed? Granted over many decades 32 seconds doesn’t amount to much, even for planetary position calculations, so I suppose it’s no big deal, just thought I’d share out of curiosity’s sake.

Hello @Hyper_Sonic,

I am surely not an expert, but the docs specify that the JulianDate is always stored in the International Atomic Time system, even thourgh the default constructor timeStandard is UTC. This might explain why JulianDate console logs have the deviation?

Documentation from JulianDate
" In order to be safe for arithmetic and represent leap seconds, the date is always stored in the International Atomic Time standard TimeStandard.TAI ."

Thanks, I see this now

Defaults to {UTC: 0, TAI: 1}

I suppose this time standard is how Cesium got its name?


  if (timeStandard === TimeStandard.UTC) {



It would appear that even set to UTC that it would be converted to TAI.

Lots of leap seconds here. I suppose this extreme time accuracy helps with the precision of things like the Sun and the Moon positions.

1 Like