expires_at is stored as a database datetime column
- Lingua principale
- Ruby
- Stelle
- 700
- Fork
- 29
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
### Context
During the DST to standard time change, when the SQL server is running in a local time zone, records cannot be found when `expires_at` is set to 1 hour.
Given a PST time and a fallback to standard time at 2 AM, 1 hour from 1 AM, is going to be still 1 AM. The date s converted to the same date that was entered and few seconds after the record cannot be found again.
The `expires_at` column should be timezone agnostic, possible solution would be to store it as an integer (epoch time),
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Parti dalla definizione del modello o dello schema per expires_at e dalla conversione datetime di ActiveRecord, quindi riproduci il DST fallback con il server SQL in un fuso orario locale. Il lavoro è completato quando la scadenza rimane individuabile durante il fallback, lo storage è indipendente dal fuso orario e la copertura dei test di regressione è stata concordata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rails, ruby
- Ambito
- database
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 30/100