will / crystal-pg

a postgres driver for crystal
BSD 3-Clause "New" or "Revised" License
463 stars 78 forks source link

undefined constant Time::Location::UTC #143

Closed Xosmond closed 6 years ago

Xosmond commented 6 years ago

Im getting this error when running pg on crystal 0.24.2:

in lib/pg/src/pg/decoder.cr:220: undefined constant Time::Location::UTC

    JAN_1_2K = Time.new(2000, 1, 1, location: Time::Location::UTC)

https://github.com/will/crystal-pg/blob/cafe761ead8f5189fab9de97dec9d05652a305df/src/pg/decoder.cr#L220

How can I solved it by myself or is it a know bug?

will commented 6 years ago

pg v0.15.0 only works for crystal v0.25 (both released today). You'll have to either upgrade crystal or downgrade pg.

Xosmond commented 6 years ago

Wow is pg already upgraded too? I will write back if I have any issue with 0.25.0. Thanks.