Hi everyone!
I’m using Neon in my Next.js application with chatbot and I store all of my date related data in UTC timezone. However, I’ve got a time where I want to retrieve all of my data in EST timezone. And I don’t want to specify it in query every time. I found a nice solution that seems great for me. I can set timezone for one connection specificaly with SET TIME ZONE 'EST';
I’m trying to do the same thing with Neon and my Next.js appliction. One thing is that I can’t understand where to place this logic. Is there anyone who can help with that?
Here’s the example of code that I was trying to use but it didn’t help
import { sql } from "@vercel/postgres";
sql.query("SET TIME ZONE 'EST'");
sql.query(MY_ACTUAL_QUERY);
sql.query("RESET TIME ZONE");