Skip to content

Commit

Permalink
feat: use local timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
brayo-pip committed Jul 17, 2024
1 parent 0f51a9f commit 6c0ef73
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions aw-firebase-sync/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use aw_client_rust::AwClient;
use chrono::Utc;
use chrono::Local;
use dirs::config_dir;
use reqwest;
use serde_json::{json, Value};
Expand Down Expand Up @@ -87,10 +87,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {

loop {
#[allow(deprecated)]
let start =
Utc::now().date().and_hms_opt(0, 0, 0).unwrap() - chrono::Duration::seconds(300);
#[allow(deprecated)]
let end = Utc::now().date().and_hms_opt(0, 0, 0).unwrap();
let start = Local::now().to_utc() - chrono::Duration::minutes(5);
let end = Local::now().to_utc();
let timeperiods = vec![(start, end)];

let query_result = aw_client
Expand Down

0 comments on commit 6c0ef73

Please sign in to comment.