How to put time of notify to Mail Title ?

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

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

Anton Tananaev 8 years ago

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

Dariusz 8 years ago

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

abyss 8 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
Dariusz 8 years ago

great job :)

Dariusz 8 years ago

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

Anton Tananaev 8 years ago

You need to configure user or server timezone in attributes.

Dariusz 8 years ago

oh.. ok :D