github / github/github-ds

expires_at is stored as a database datetime column

未关闭
#62 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Ruby
星标
700
派生
29
PR 合并指标
30 天内没有已合并 PR

描述

### 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),

贡献指南

打开贡献指南

调研方向

从 expires_at 的模型或架构定义以及 ActiveRecord 的 datetime 转换入手,然后使用本地时区中的 SQL server 重现 DST fallback。完成的标准是:expiration 在整个 fallback 过程中仍然可查找,存储与时区无关,并且已就回归覆盖达成一致。

由索引模型根据 Issue 内容生成。

评估

技术栈
rails, ruby
领域
database
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
30/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。