Skip to content

Commit

Permalink
Set the protobuf timestamp to the correct value
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Cattermole <[email protected]>
  • Loading branch information
adam-cattermole committed Nov 6, 2024
1 parent 3936370 commit 6cc5638
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/service/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::envoy::{
};
use crate::service::grpc_message::{GrpcMessageResponse, GrpcMessageResult};
use crate::service::GrpcService;
use chrono::{DateTime, FixedOffset, Timelike};
use chrono::{DateTime, FixedOffset};
use log::{debug, warn};
use protobuf::well_known_types::Timestamp;
use protobuf::Message;
Expand Down Expand Up @@ -100,8 +100,8 @@ impl AuthService {
.expect("Error!")
.map_or(Timestamp::new(), |date_time: DateTime<FixedOffset>| {
Timestamp {
nanos: date_time.nanosecond() as i32,
seconds: date_time.second() as i64,
nanos: date_time.timestamp_subsec_nanos() as i32,
seconds: date_time.timestamp(),
unknown_fields: Default::default(),
cached_size: Default::default(),
}
Expand Down

0 comments on commit 6cc5638

Please sign in to comment.