Skip to content

Commit e109493

Browse files
committed
Fix: Change timezone to Asia/Kolkata
1 parent 16cbd4c commit e109493

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/graphql/mutations.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
use async_graphql::{Context, Object};
22
use ::chrono::Local;
33
use chrono::{NaiveDate, NaiveTime};
4+
use chrono_tz::Asia::Kolkata;
45
use sqlx::PgPool;
5-
use sqlx::types::chrono;
6+
use sqlx::types::chrono;
67
use std::sync::Arc;
78
use hmac::{Hmac,Mac};
89
use sha2::Sha256;
@@ -113,10 +114,7 @@ impl MutationRoot {
113114
return Err(sqlx::Error::Protocol("HMAC verification failed".into()));
114115
}
115116

116-
117-
118-
119-
let current_time = Local::now().time();
117+
let current_time = Local::now().with_timezone(&Kolkata).time();
120118

121119
let attendance = sqlx::query_as::<_, Attendance>(
122120
"

0 commit comments

Comments
 (0)