extract and fix clock in js.