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:
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?
var foo = comments.last.created.format(#YYYY-MM-dd H:m:s Z);
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?
Please sign in to leave a comment.
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.
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:
Global time zone setting:
User time zone setting:
What time is shown on mouse over the mentioned workflow on '/workflows' screen in YouTrack?
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.,
Thanks!