mirror of
https://github.com/discourse/discourse.git
synced 2026-08-12 05:02:14 +08:00
Backport of #42497 to release/2026.1. --- Cakeday anniversary requests could pass legacy timezone aliases such as `Asia/Calcutta` to PostgreSQL. PostgreSQL 18 no longer recognizes that alias, so affected requests failed instead of returning anniversaries. The [`plugins backend` CI job](https://github.com/discourse/discourse/actions/runs/31455659737/job/93668764690) failed in `plugins/discourse-cakeday/spec/integration/cakeday_spec.rb:73` with `PG::InvalidParameterValue: ERROR: time zone "Asia/Calcutta" not recognized`. This commit uses TZInfo's canonical identifier for the SQL timezone while preserving the user's configured timezone for date calculations. The failing cakeday integration spec now passes on PostgreSQL 18. Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com> |
||
|---|---|---|
| .. | ||
| anniversaries_controller.rb | ||
| birthdays_controller.rb | ||
| cakeday_controller.rb | ||