Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

157
Visualizações
Timestamp is rendered inconsistently on Heroku dyno

I am having a rough time getting a Rails 5 view (hosted on a Heroku dyno) to render a consistent timestamp value. The Heroku support team can't figure out the issue.

1) I visit the specific view (an order form) and observe a datetime value rendering is incorrect. The time code should be 2000-01-01 01:06:10 but instead reads 1999-12-31 19:06:10.

This is what is fully rendered below in the html.erb view (sourced from a datetime column in Postgres):

1999-12-31 19:06:10 -0600

The code used to render this timestamp is simple: item.time_start which is from a Model named Item with an attribute/column named time_start. No other formatting is going on with this process.

2) I then click on the Restart All Dynos link on the Heroku Dashboard

3) I immediately visit the same page and observe the time code as correct:

2000-01-01 01:06:10 UTC

Does anyone have ideas why this change would occur randomly during each day? Why does a server restart change the timestamp presentation?

Schema

create_table "order_items", force: :cascade do |t|
  t.time  "time_start"
  t.time  "time_end"
end

Stack/Config

Ruby 2.4.1
Rails 5.0.2
Postgres 9.6.2
production.rb setting: config.time_zone = "UTC"
over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda