Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 82391

Timeformat issue with using scheduled events in systemcontext

$
0
0

Dear all,

For a client we archive certain log (auditlogging) objects everyday during a scheduled event. These auditlogging objects have timestamps and use System.CreatedDate. While debugging I can see these have the correct time also when displaying them in a regular datagrid.

So far so good.

Archiving these logs happens during a scheduled event which runs in a systemcontext - All archived logs are written in a log file (.txt). The problem we have is that all these logs are 2 hours behind in the .txt file(we are currently in GMT+2).

While debugging, I learned (quite obvious now) that the session time is not shown in +2 (probably because of systemcontext) in the variables as it normally does , thus the time cannot be parsed to our local timezone.

My question:

Is there a way to print the correct date? Except implementing a timezone check during the archiving and depending on the timezone add an hour or maybe 2 hours? I've also checked variables like adding 'z' as in:

MX Documentation formatDateTime($object/Date1,'EEE, d MMM yyyy HH:mm:ss Z')

I look forward to your reply,

Regards,


Viewing all articles
Browse latest Browse all 82391

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>