I have a very strange issue happening on PDF Generations.
In the workflow, I create a new thing with two date values (1 May & 31 May for argument sake) and then generate a PDF using those values.
When the thing is viewed on the pdf generation page the date values are displayed correctly however when the PDF generates the date values on the actual PDF are displayed as the date -1 day (30 Apr & 30 May).
Anyone know who the author of the SelectPDF plugin is? This issue appears to be a bug as I have tried everthing possible and the issue continues to default the dates?
Can you reproduce the issue without the PDF plugin? At the end of the day, the PDF plugin just takes a screenshot of the page so you should be able to reproduce without using it.
I have tried to reproduce the issue but if I just navigate to the page the dates are correct. When the PDF os attached to the email it subtracts 1 day from each of the date values.
Who can we turn to to get this fixed? selectPDF just displays dates in a wrong timezone but how this can happen is a mystery to me.
I can put it on a static timezone but then it will not display correctly for some users in different timezones. The problem is with current user’s timezone.
Upon further inspection, it seems the date and times are stored in UTC and then displayed to users in their timezones. When SelectPDF is triggered it displays it in UTC, no matter what timezone is selected in the print page.
I can extract the date and time from a datepicker, but would it be possible to store minutes with double digits?
It doesn’t work when you print the pdf using SelectPDF. It will always default to UTC.
As for saving the date as text: it behaves the same way. When I do datepicker’s date:formatted as and then however I set it, it will always use UTC as the base. So it gives the same problems as just saving it as a date. The only thing that works is saving as text using :extract. For that it would be nice to show 0-9 as 00-09 instead of ‘0’.
I got this resolved when creating/updating the thing. I would then create an entry with the date/time (used for display) and a date_time_text field when printing through SelectPDF. Just make sure that the text field formatting is exactly what is required on creation/update.
This way a text value is used and the TimeZone settings are not an issue.