We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7d78735 commit 3c113a0Copy full SHA for 3c113a0
1 file changed
src/main.rs
@@ -1,5 +1,6 @@
1
use async_graphql::EmptySubscription;
2
use axum::http::{HeaderValue, Method};
3
+use sqlx::Executor;
4
use sqlx::PgPool;
5
use std::sync::Arc;
6
use time::UtcOffset;
@@ -114,6 +115,12 @@ async fn setup_database(database_url: &str) -> Arc<PgPool> {
114
115
let pool = sqlx::postgres::PgPoolOptions::new()
116
.min_connections(2)
117
.max_connections(3)
118
+ .after_connect(|conn, _meta| {
119
+ Box::pin(async move {
120
+ conn.execute("SET TIME ZONE 'Asia/Kolkata';").await?;
121
+ Ok(())
122
+ })
123
124
.connect(database_url)
125
.await
126
.expect("Pool must be initialized properly.");
0 commit comments