Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
pheobeayo committed Aug 29, 2024
1 parent c9854a4 commit 3df5ca2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/endpoints/achievements/verify_seniority.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use axum::{
Json,
};
use axum_auto_routes::route;
use chrono::{TimeZone, Utc};
use chrono::{TimeZone, Utc, DateTime};
use chrono::Datelike;
use serde_json::json;
use starknet::core::types::FieldElement;
Expand All @@ -34,8 +34,8 @@ pub async fn handler(

match execute_has_deployed_time(state.clone(), &query.addr).await {
Ok(timestamp) => {
let timestamp_u64 = 1657113606;
let date_time = Utc.timestamp_opt(timestamp_u64 as i64, 0).unwrap();

let date_time = DateTime::from_timestamp(timestamp as i64, 0).unwrap();
let duration = date_time ;
let days_passed = duration.num_days_from_ce();
if (achievement_id == 14 && days_passed >= 90)
Expand Down

0 comments on commit 3df5ca2

Please sign in to comment.