Skip to content

assert.ObjectsAreEqual work not correct with serialized\deserialized time.Time #950

@senyast4745

Description

@senyast4745

time.Time not equals before and after serialization/deserialization to JSON on machine in UTC
reason: golang/go#19486 (comment)

code: https://play.golang.org/p/H0ACWIBZE3O

solution: change the time.Time comparison format. For example, compare time using time.Equal

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