Why is the timestamp field in the Firebird database displayed differently in a Ruby on Rails application?

Asked

Viewed 228 times

0

I have a database Firebird 2.5 legacy. Access it via IBExpert 2016.9.4.1 This database is part of a request management system that is being migrated from an application Delphi 10.1 Update 2 for an application Ruby(2.3.3) on Rails(4.2.7.1).

I noticed that the fields of the type TIMESTAMP are presenting divergence between what is in the bank and what is shown in the application RoR. Example:

 - IBExpert mostra:      30.12.1899 15:10
 - Ruby on Rails mostra: 30.12.1899 15:03

Does anyone know why this happens and how to solve it?

  • What is the numerical value of the date stored in the database?

  • I cannot access the numerical value. By Ibexpert, it generates an overflow error when I try to give a CAST.

  • Does it not have anything related to the Unix Timestamp format ?

  • Possible. But how to fix this without changing the database data?

  • I changed the type of column to TIME instead of TIMESTAMP and solved the problem. I believe it was a bank modeling error.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.