wellcomecollection / content-api

📖 The API + ETL pipeline for searching the Wellcome Collection Prismic Repository.
MIT License
0 stars 0 forks source link

Content-api /venues incorrectly identifies days of the week around midnight during BST #133

Closed agnesgaroux closed 4 months ago

agnesgaroux commented 4 months ago

LE&E alerted us to a few item requests coming through for Sunday, when the library is closed https://wellcome.slack.com/archives/CUA669WHH/p1722266021986019

The content-api is inferring the day of the week from a UTC timestamp, in order to figure out whether the timestamp is on an open or closed day. Around midnight BST, a Sunday BST will be a Saturday UTC which caused the Sunday (London) to incorrectly be considered an open day. FIX https://github.com/wellcomecollection/content-api/pull/132 From the UTC timestamp, we specify the timezone "Europe/London" when getting the day of the week, eg. Monday, Tuesday