From 720d2d2a65a186ad7e12b913d93279ca777b4916 Mon Sep 17 00:00:00 2001 From: Lidi Zheng Date: Thu, 1 Apr 2021 10:22:53 -0700 Subject: [PATCH] Use Realtime instead of Monotonic time for CSDS (#25857) --- src/core/ext/xds/xds_api.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ext/xds/xds_api.cc b/src/core/ext/xds/xds_api.cc index 43f0a4b7a00..daf16c18cd6 100644 --- a/src/core/ext/xds/xds_api.cc +++ b/src/core/ext/xds/xds_api.cc @@ -3520,7 +3520,7 @@ google_protobuf_Timestamp* GrpcMillisToTimestamp(const EncodingContext& context, grpc_millis value) { google_protobuf_Timestamp* timestamp = google_protobuf_Timestamp_new(context.arena); - gpr_timespec timespec = grpc_millis_to_timespec(value, GPR_CLOCK_MONOTONIC); + gpr_timespec timespec = grpc_millis_to_timespec(value, GPR_CLOCK_REALTIME); google_protobuf_Timestamp_set_seconds(timestamp, timespec.tv_sec); google_protobuf_Timestamp_set_nanos(timestamp, timespec.tv_nsec); return timestamp;