var d = new Date();
var hour = 0 - d.getTimezoneOffset();
viewer.animation.viewModel.timeFormatter = function (date, viewModel) {
var dateZone8 = Cesium.JulianDate.addMinutes(date, hour, new Cesium.JulianDate());
var gregorianDate = Cesium.JulianDate.toGregorianDate(dateZone8);
var millisecond = Math.round(gregorianDate.millisecond);
if (Math.abs(viewModel._clockViewModel.multiplier) < 1) {
return Cesium.sprintf("%02d:%02d:%02d.%03d;", gregorianDate.hour, gregorianDate.minute, gregorianDate.second);
}
return Cesium.sprintf("%02d:%02d:%02d GMT+8", gregorianDate.hour, gregorianDate.minute, gregorianDate.second);
};
只能更改Animation的时间,timeline的时间不会更改