Hello,
I am using:
hanami (1.2.0)
hanami-model (1.2.0)
and PostgreSQL 10.5 with table authors in it. This table has a column date_of_birth (Date type).
I have an entity Author with schema containing date_of_birth attribute and type Types::Date.
For one author this column contains following
=# select date_of_birth from authors where id='0a33078c-c440-4279-9cc7-172b8684b87a'
date_of_birth
---------------
0530-01-01 BC
(1 row)
If i try to parse this string manually via
Date.parse('0530-01-01 BC').year => -529
I get correct date with minus.
But if I do this
@author_repo.find(params[:author_id]).date_of_birth.year => 530
it ignores BC part.
Could you tell me if I am doing something wrong or if it an issue. If last, maybe you could give me a hint where I can take a look to help you to solve this issue.
Cheers!