get_date with time zone and daylight saving time

435 views
Skip to first unread message

ciche...@fater.it

unread,
May 19, 2014, 10:39:12 AM5/19/14
to suppor...@runmyprocess.com
Hello,
I am using the following function to get the current date/time:
get_date(timestamp("SECOND"),"yyyy-MMM-dd HH:mm:ss")

Unfortunately, the time returned it is referred to Greenwich Mean Time.

Is it possible to get the current time related to time zone and offset with the daylight saving time ?

Thank you!

Sabine El Rassy

unread,
May 19, 2014, 10:46:46 AM5/19/14
to RunMyProcess Support Forum
Hello Luigi,

You can use this code to get the correct time according to Italy's zone:

<#setting time_zone = "UTC">
<#setting datetime_format = "dd/MM/yyyy HH:mm">
<#assign date_for_log = now("dd/MM/yyyy HH:mm")?datetime>
<#setting time_zone = "Europe/Rome">
${date_for_log}

Here's the Freemarker's documentation for more details.

Regards,

Sabine EL RASSY

Customer Solutions Engineer

ciche...@fater.it

unread,
May 20, 2014, 6:59:38 AM5/20/14
to suppor...@runmyprocess.com
Thank you, Sabine, it worked fine.
Anyway, the settings are active only inside the script and not for the whole process right ?



Sabine El Rassy

unread,
May 20, 2014, 8:34:16 AM5/20/14
to RunMyProcess Support Forum
You're welcome.

Yes exactly, the settings will be modified within the script only.
Reply all
Reply to author
Forward
0 new messages