Visitar URL original
Allow specifiying a timezone for connections · Issue #624 · PyMySQL/PyMySQL · GitHub
Skip to content

Allow specifiying a timezone for connections #624

Description

@Nothing4You

Hi there,
please implement setting the timezone on a connection level, similar to the way mysql.connector works with time_zone.

This allows ensuring a constant timezone like UTC independent from what the database might have configured.

Related: aio-libs/aiomysql#235

Activity

  1. methane commented on Mar 19, 2018

    @methane
    Member

    FYI, init_command="SET SESSION time_zone=UTC" works.

  2. guyskk commented on Dec 26, 2018

    @guyskk

    FYI, init_command="SET SESSION time_zone=UTC" works.

    Use init_command="SET SESSION time_zone='+00:00'"
    to avoid pymysql.err.InternalError: (1298, "Unknown or incorrect time zone: 'UTC'")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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