Repository navigation
Conversation
|
@qwqcode 这个 PR 已经开启将近一个月有余,非常抱歉打扰,但是请您审阅这个 PR 并且给出修改意见(如果可能的话) |
49ef8a5 to
6dca77e
Compare
6dca77e to
991db35
Compare
- Verify parseDate prioritizes date_unix over date_utc and preserves instants across UTC offset formats - Ensure CommentNode display and date sorting stay consistent with parsed timestamps - Add Go tests validating CookComment/CookPage serialize date_unix, date_utc, and legacy date fields consistently across timezones
9ae0dc6 to
452a2bb
Compare
|
感谢您的建议 |
dajiaohuang
left a comment
There was a problem hiding this comment.
Thanks for adding synthetic timestamp coverage. The current diff includes ui/artalk/tests/timestamps.test.ts cases for Unix timestamp precedence, equivalent RFC3339 offsets, legacy date fallback, comment display, and date sorting. I did not run this test or the suite in this pass, so this is source inspection only.
Scope note: compared with the previously reviewed head 991db350, the current head 452a2bbc adds nine commits and a broad set of authentication/guest-credential, OAuth, notification-ownership, and page-fetch security changes alongside the timestamp work. Please split these substantial non-timestamp changes into focused PRs, or clarify why they belong in this timestamp PR, before requesting approval. I am not approving the expanded change set.
dajiaohuang
left a comment
There was a problem hiding this comment.
Correction to my prior comment: I conflated the nine-commit compare from the previously reviewed head with the current PR-versus-base diff. I checked the exact current PR files endpoint: it contains 12 files focused on timestamp serialization, parsing/display/sorting, and compatibility tests; the unrelated security/auth changes I mentioned are not part of the current PR diff. Please disregard my request to split those changes. I have not run the new tests or any suite, and I am not approving the PR in this source-only pass.
|
? 如果我的评论给您带来了任何困扰,在这里致歉 |
|
我会择日另行重新开启此请求 |
|
你的评论没有给我带来困扰;抱歉是我此前的错误审阅造成了困惑。我把从旧审阅 head 到当前 head 的比较误当成当前 PR 相对 base 的变更,才错误要求拆分安全/认证改动。我已在后续 COMMENTED review 按当前 PR-vs-base 的 12 个文件,我没有确认出可具体指出的代码缺陷。这次只检查了新增测试的源码,没有运行测试,因此不能说测试已通过。你不需要基于我那条已撤回的拆分请求做修改。谢谢你补充时间戳测试。 |
Fix timezone-ambiguous comment timestamps by exposing timezone-safe timestamp fields and making the UI prefer them when rendering relative time.
Previously, the API returned
dateas a timezone-less string such as2026-07-27 12:00:00. Browsers parse that as local time, so users in different timezones could see newly created comments as “1 hour ago” or keep seeing “now” when the parsed time falls in the future.Link to: #1165
Changes
date_unixanddate_utcto cooked comment/page API responses.datefield for backward compatibility.date_unix/date_utcbefore falling back to legacydate.Compatibility
This is backward compatible:
dateremains unchanged.date_unixordate_utcto avoid timezone ambiguity.