How to skip to a certain time when clicking on a button

I was wondering if there's any way to skip to a certain time when clicking on a HTML button. If I start the Cesium program at 2017-01-02T19:05:45Z and I want to switch the time to 2017-01-02T19:26:25Z after clicking a button, how would I go about doing that?

So far I have a button that calls a function that switches the tracked entity, so what I would like to do instead is switch the time after clicking on it.

Thanks,

Erich

Hello Erich,

You can use a function like this to change the current time:

function changeTime() {
var newTime = Cesium.JulianDate.fromIso8601(ā€˜2017-01-02T19:26:25Zā€™);
viewer.clock.currentTime = newTime;
}

``

Best,

Hannah

Easy as that! I was definitely overthinking this...

Thank you, Hannah.

Erich