Skip to content

parseTime does not recognize fractions of a second #331

Closed
@hweidner

Description

@hweidner

Beginning with MySQL 5.6.4, a field of type DATETIME or TIMESTAMP can have a resolution up to one microsecond. See http://dev.mysql.com/doc/refman/5.6/en/datetime.html for details.

go-mysq-driver/mysql with parseTime=true does currently not recognize fractions of a second. You need to define a field as DATETIME(0) (or skip the precision) to make MySQL output the time without fractional part.

Can the parser be extended to recognize fractions?

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