offset date picker/date time picker in email notifications

Govardan Krishna February 10, 2016

we have couple of date pickers and date time pickers. I have 2 issues with these fields

  1. Date and time are not absolute values, instead displays as xx minutes ago. would like to see real created/updated date time
  2. Date times values in emails appears to be shown in the GMT time zone.would like to see Eastern time zone when dates are in email notifications

Default user time zone is set to (GMT-05:00) New York

Custom email notification uses $issue.getCustomFieldValue("customfield_xxxx") to get customfield values.

JIRA Version 6.4.3

Your help is appreciated...

 

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 10, 2016
  1. See https://confluence.atlassian.com/display/JIRAKB/Disable+relative+dates+in+JIRA+applications
  2. You've got a time zone problem on the server (probably).  You can test this by forcing the  correct timezone for the java virtual machine in the setenv.sh/setenv.bat file (from memory, -Duser.timezone= )
Govardan Krishna February 11, 2016
  1. works after setting jira.lf.date.relativize=false
  2. If i edit date/time field of an issue -> "Issue Updated" event generates email and has correct local timezone(EST) in email as well. If i perform/take action on an issue -> custom event generates email and has wrong time zone for dates. Following is used inside email templates to get the value

$issue.getCustomFieldValue("customfield_xxxx")

Is data stored in as GMT in database?

Please assist on how can i get local timezone in email notifications

 

Govardan Krishna February 12, 2016

FYI...Issue is resolved

"customfield_xxxxx is a date/time picker", JIRA somehow converts time to GMT(probably that is what persisted in database as GMT) and sends out email notifications.

dateformatter does converts date/time to use local timezone and displays date in local timezone.

$dateformatter.format($issue.getCustomFieldValue("customfield_xxxxx")),

Suggest an answer

Log in or Sign up to answer