use format.utc instead of format (#128567) (#128655)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit b20de118cd)

Co-authored-by: Lee Drengenberg <lee.drengenberg@elastic.co>
This commit is contained in:
Kibana Machine 2022-03-28 13:20:39 -04:00 committed by GitHub
parent 8f5b547da2
commit 3be42862a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -517,7 +517,7 @@ export class CommonPageObject extends FtrService {
*/
formatTime(time: TimeStrings, fmt: string = 'MMM D, YYYY @ HH:mm:ss.SSS') {
return Object.keys(time)
.map((x) => moment(time[x], [fmt]).format())
.map((x) => moment.utc(time[x], [fmt]).format())
.reduce(
(acc, curr, idx) => {
if (idx === 0) acc.from = curr;