Skip to content

Failing test with a negative UTC offset #321

@austindrenski

Description

@austindrenski

I'm trying to build the test suite in UTC-5:00, and I think there's a timezone formatting issue here:

https://github.com/npgsql/Npgsql.EntityFrameworkCore.PostgreSQL/blob/713b79c9dac7b60273c7de4b0ae6b1fa997aa4a9/test/EFCore.PG.Tests/Storage/NpgsqlTypeMappingTest.cs#L37-L53

Swapping L46-L49 with the following fixed it on my dev machine:

var offset = TimeZoneInfo.Local.BaseUtcOffset.Hours;
Assert.StartsWith($"TIMESTAMPTZ '1997-12-17 07:37:16{offset:+00;-00}",
    mapping.GenerateSqlLiteral(new DateTime(1997, 12, 17, 7, 37, 16, DateTimeKind.Local)));

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