Fix use of time 0.2 in X-Ray integ test
@@ -6,7 +6,7 @@ extern crate time;
use rusoto_core::Region;
use rusoto_xray::{GetServiceGraphRequest, XRay, XRayClient};
-use time::Time;
+use time::OffsetDateTime;
// duplicates the AWS X-Ray CLI example, which gets an (empty) service graph
// for the last 600 seconds
@@ -14,7 +14,8 @@ use time::Time;
async fn should_get_service_graph() {
let client = XRayClient::new(Region::UsEast1);
- let time = (Time::now().second() - 30) as f64; // 30 seconds in the past
+ let time = (OffsetDateTime::now().timestamp() - 30) as f64; // 30 seconds in the past
+ println!("{:?}", time);
let request = GetServiceGraphRequest {
start_time: time - 600.0,
