fix(newsletter): use US timezones for Sunday delivery guard #77
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "exe-dev-bot/market:fix/sunday-guard-timezone"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The newsletter Sunday guard was using
getUTCDay()which is 5–10 hours ahead of US timezones. This caused:Changes
getUTCDay()withIntl.DateTimeFormatchecks against both US timezone boundaries:America/New_York— earliest to enter SundayPacific/Honolulu— latest to leave SundayMON-SATto*(every day) since the code-level guard now handles Sunday detection correctlyTesting
isSundayInUS()returnstruewhen it's Sunday in New York but not Honolulu (and vice versa)