How to put time of notify to Mail Title ?

Dariusz7 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 < ...)
Dariusz7 years ago

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

Anton Tananaev7 years ago

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

Dariusz7 years ago

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

abyss7 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
Dariusz7 years ago

great job :)

Dariusz7 years ago

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

Anton Tananaev7 years ago

You need to configure user or server timezone in attributes.

Dariusz7 years ago

oh.. ok :D