Skip to content
Discussion options

You must be logged in to vote

I tinkered around a bit more, and I found that

async def get_async_session():
    async_session = SessionLocal()
    await async_session.execute(text("SET TIME ZONE 'America/Toronto'"))  # (new)
    try:
        yield async_session
    finally:
        await async_session.close()

does nothing with postgresql+asyncpg:// but seems to work with postgresql+psycopg://

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@vickypalani
Comment options

@gordthompson
Comment options

@gordthompson
Comment options

Answer selected by vickypalani
@vickypalani
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants