guardian / crossword-uploader

Repository for the AWS lambda functions used to upload crosswords
0 stars 0 forks source link

Fix BST crossword pdf publishing #16

Closed philmcmahon closed 7 years ago

philmcmahon commented 7 years ago

To work out whether or not to make a pdf public, the app takes the date contained in the name of the pdf file, converts it into a LocalDate, then immediately converts that into a DateTime using the toDateTimeAtStartOfDay function. This function uses UTC by default, resulting in crossword PDFs getting published at 00:00 UTC, which is 01:00 BST = too late!

This fixes that problem by specifying the time zone as Europe/London

LATaylor-guardian commented 7 years ago

Crosswords - the gift that keeps on giving! 👍

philmcmahon commented 7 years ago

Thanks Luke!