How to put time of notify to Mail Title ?

Dariusz6 years ago

I tried to use

#set($subject = " $dateTool.format("hh:mm:ss", $event.serverTime, $locale, $timezone)  test")

but it couse a error

[code]
Encountered "hh" at mail/test.vm[line 1, column 37]
Was expecting one of:
...
     - ParseErrorException (... < NotificationFormatter:79 < *:110 < *:91 < NotificationMail:112 < NotificationResource:61 < ...)
Dariusz6 years ago

only one i got is $event.serverTime
Thu Jan 04 14:19:28 CET 2018

Anton Tananaev6 years ago

I'm not sure if it's possible. And even if it is, you should obviously escape double quotes in the string.

Dariusz6 years ago

$event.serverTime
is fine for me. Thanks for answer, thanks for great software Anton

abyss6 years ago

This working fine to me

#set($subject = " $dateTool.format('hh:mm:ss', $event.serverTime, $locale, $timezone)  test")

The result is

Subject:  01:36:46  test
Dariusz6 years ago

great job :)

Dariusz6 years ago

how to set it to local time? it shows as UTC

Anton Tananaev6 years ago

You need to configure user or server timezone in attributes.

Dariusz6 years ago

oh.. ok :D