How to fix cesium timezone?

Here’s a code snippet for what you’d need to do to change the timezone that’s displayed:

viewer.animation.viewModel.timeFormatter = function(date, viewModel) {
  date = Cesium.JulianDate.toDate(date);
  return `${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`;
};

This would change the default function to instead display just hours, minutes and seconds (in whatever timezone is set by the browser I think). This is where you could integrate a library like MomentJS (https://momentjs.com/) that’ll format the given date and return the string here.

Here’s a Sandcastle.