Skip to content

Bad date calculations #53

@grosch

Description

@grosch

https://github.com/vapor/postgresql/blob/388346471c6a89c2695235d8ffff43c5941283af/Sources/PostgreSQL/Data/PostgreSQLData%2BDate.swift#L32

You're doing date calculations by using seconds, which is always a bad thing to begin with.

However, I'm hitting a case where the app crashes with

NIO-ELT-#1 (4): EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)

I believe it's because the days is coming through as a negative number.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions