[SOLVED] Help with SelectPDF Date Values

Help with SelectPDF Date Values

Hi there,

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).

The workflows are below:

Any ideas would be appreciated.

Regards,
Pieter

Hi there,

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?

Regards,
Pieter

@emmanuel, looks like Bubble is the author? Any ideas here?

Appreciate the assistance.

Regards,
Pieter

Hello,

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.

Hi @emmanuel

Thank you for the prompt response.

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.

Regards,
Pieter

Which timezone are you in? Can you format the dates as texts in the first action and use them?

I am in UTC+2. Could this be the issue? I’ll try storing in text fields and test.

I managed to resolve this using the text values instead. Thanks a mil for the assistance!

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.

@emmanuel Do we need to contact SelectPDF?

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?

Now it displays like:
image

Where I extract Hour and Minute

image

You should use the formatted as option on the date and pick the time one you want.

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’.

Hi

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.

Regards,
Pieter

So how did you create the text field from the date field?

I would be interested in that as well due to same troubles. Do you found a way to do that in the meantime?