Two hour difference in microflow and what is stored in DB

3
Hi All, I’m setting a sign date using [%CurrentDateTime%] but while debugging it shows two hours late However: showing it in a datagrid does show the correct time but when I’m using this attribute to put it in a DocTemplate (PDF generation) it shows again two hour early… See bellow: top is datagrid, bottom is on the pdf… Here under the debug time…. I’ve tried changing the app timezone, setting my user time zone, enabling and disabling the localise on the date time attribute just in case… No succes… Any idea’s?   Thanks!
asked
3 answers
1

Hi Jeremie,

So, what you are experiencing is the timezone difference. A datetime attribute is always stored in UTC time in your database, and the app will take care of displaying it in the users time if the attribute is set to 'localised'. For your user this would be UTC+2 as shown in the datagrid. When creating a pdf, the default UTC time is used since this is what's actually stored in the database, which explains the difference in time you are seeing. There's a number of workarounds for this which includes storing the date as a string, checking the users timezone in the PDF create flow.

Your session time also says UTC, so your microflow is not executed in the users context.

answered
3

Hi Jérémie,

 

You probably have used the following query → select * from tableX where name=’...’. This query will retrieve all information from tableX (also your ID in the Oracle DB). This ID cannot be completed in your entity X, because it’s not described as an atribute of your entity.

To retrieve the correct data from the Oracle DB you need to specify all necessary attributes in the select query.

E.g. select name,email from tableX where name=’...’

 

Kr 

 

Stijn

answered
0

ok, apparently I edited a existing question.. But non the less: any ideas? :) 

answered