Date field time zone in workflow

I'm sending a notification from a workflow that includes the date of the last comment. When I construct the message, I'm doing something like this:

var foo = comments.last.created.format(#YYYY-MM-dd H:m:s Z);
prettyPrint();

It works just fine, but the date that's produced is in GMT, not the time zone I have set in the YouTrack settings (Administration > Settings > Visual > Default timezone). Is there a way to get the format() method to honor the zone specified in the settings, or to otherwise get it to use the local time zone?
10 comments
Comment actions Permalink
On my environment everything works fine, the date timezone is considered.
Note, not only the server time zone but also the user time zone is taken into account.

Please attach screenshots to identify the problem if possible.
0
Comment actions Permalink
Attached is the workflow. It's showing a syntax error on the last line, but the reported error is "wrong number of parameters", which doesn't make any sense (the number is correct), plus it does work, so I'm chalking it up to the quirkiness of the editor.

Anyway, the date formatting is in the assignment of theMessage. The e-mail message that goes out has the time in GMT, and I'd like it to reflect local time, which is -7h (America/Phoenix). I'm also attaching screen shots of the global time zone setting in YouTrack, as well as the setting in my profile, both of which are correct. I checked on the server, which is Windows Server 2008, with systeminfo, and it reports the time zone as "<GMT-07:00> Arizona".

Workflow:
Screen Shot 2013-02-28 at 09.57.25.png


Global time zone setting:
Screen Shot 2013-02-28 at 10.03.47.png


User time zone setting:
Screen Shot 2013-02-28 at 10.03.31.png
0
Comment actions Permalink
And here's a shot of how the time appears in the resulting e-mail messages:

Screen Shot 2013-02-28 at 10.08.56.png
0
Comment actions Permalink
Are you still experiencing this problem? Please check timestampts in the workflow editor > messages window, do they match the server time?
What time is shown on mouse over the mentioned workflow on '/workflows' screen in YouTrack?
0
Comment actions Permalink
Yep, still seeing it.

The Messages window shows timestamps in my local zone. The server is also set to the same zone and reports the same time. So the only place I'm seeing something different is in the messages being sent out by the workflow, where GMT is used. (BTW, those messages are being sent from a scheduled workflow, and that workflow is firing at exactly the time it should.)

On the /workflows screen, the hover text only contains the date, e.g.,

Last modified at 08:54 by root (root)
0
Comment actions Permalink
<friendly bump>
0
Comment actions Permalink
Do you see the same incorrect zone for stateless rules as well as for scheduled?
0
Comment actions Permalink
Yes, messages also show GMT when sent by a stateless rule.
0
Comment actions Permalink
Did you complete the '#' symbol by Ctrl+Space in the 'format' method or just write the entire string "#YYYY-MM-dd H:m:s Z"?
0
Comment actions Permalink
I had just typed it. Since the context help text showed up in the inspector as soon as I typed the '#' character, I assumed all was well. But, using completion did the trick; now I'm getting timestamps in the correct time zone.

Thanks!
0

Please sign in to leave a comment.