Set the time to position the sun

Hi All,

I am trying to figure out how to set the time in Cesium so that the terrain lighting is correct for the time of day that the dataset I am visualizing twas captured. I have timestamps in UTC but cannot figure out how to gte Cesium to recognize them, I thought it was just setting the clock in the viewer, but nothing changes:

// this.cesium is a viewer object.

this.cesium.clock.currentTime = new Cesium.CallbackProperty(function() {

var date = new Date(that.model.get(‘current_time’));


return JulianDate.fromDate(date);

}, false);

The time never gets logged to the console.

Any assistance would be greatly appreciated!



The clock,, currentTime property is of type JulianDate.

Would the following not solve your problem?

this.cesium.clock.currentTime = JulianDate.fromDate(date);
this.cesium.clock.multiplier = 1;
this.cesium.clock.shouldAnimate = true //if it was paused.


Looks like what I was missing was setting the property directly and setting a multiplier.