Skip to content

unknown PostgreSQL timezone: 'Europe/Berlin'; will use UTC when select any data with timestamptz datatype on Windows #223

@sharmankin

Description

@sharmankin

when I try make select any data with timestamptz datatype on Windows I get the warning (no exception)
unknown PostgreSQL timezone: 'Europe/Berlin'; will use UTC

For Example:

from psycopg import connect

conn = connect(
    '***********************************'
)
conn.execute(
    """
    set timezone to 'Europe/Berlin';
    """
)

cur = conn.cursor()
cur.execute(
    """
    select current_timestamp
    """
)

print(cur.fetchone())
# unknown PostgreSQL timezone: 'Europe/Berlin'; will use UTC
# (datetime.datetime(2022, 2, 9, 17, 5, 15, 614415, tzinfo=datetime.timezone.utc),)

and realy all data fetched from cursor in UTC

I check this on Linux and lib work properly without warnings

psycopg 3.0.8
python 3.9 - 3.10
Windows 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions