Hi,
when I specify a DueDate on issue creation, e.g. 12.01.2013, the value stored in the database is 11.01.2013.
However, when I view the issue the DueDate field has the correct value (12.01.2013) and in the search results the wrong one (11.01.2013).
Also the wrong value (1 day before) is returned when retrieving the DueDate in a plugin via this code:
Calendar dueDate = Calendar.getInstance(); dueDate.setTimeInMillis(issue.getDueDate().getTime());
What is the reason for this behaviour? How should the correct DueDate be retrieved?
Environment:
- SLES 10
- JIRA-4.4.4 / Java 1.6
- Oracle 11.3.0.2 on a separate, externally maintained system
Cheers,
Matthias
Community moderators have prevented the ability to post new answers.
Matthias,
It seems that you ran into known bug in JIRA: https://jira.atlassian.com/browse/JRA-26962 and https://jira.atlassian.com/browse/JRA-26160
Fortunately, the bug has been fixed in JIRA 5.0.1 and above. I'd suggest you to upgrade your instance to the latest version to avoid this bug. Meanwhile, you can add <tt>-Duser.timezone=GMT+1 </tt>under your JVM startup parameter so the new created issue will have a correct due date in the db.
Cheers, Vicky.
Upgrading JIRA is currently not an option.
Setting the timezone explicitely helps: all new created issues now have the same value in the database as shown in the UI.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What's the timezone set for the instance. Does the difference match the timezone difference from GMT?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Renjith,
the timezones are:
which should match, shouldn't they.
Cheers,
Matthias
BTW: the timezones were retrieved via
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If I select '12.01.2013' as DueDate in the UI, a 'select DueDate from jiraissue' shows the value '11.01.13'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes: the IssueNavigator shows the wrong date (11.01.2013).
BTW: as mentioned above I use JIRA 4.4.4.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And you also said "and in the search results the wrong one (11.01.2013)" - Is this happening in Issue Navigator?
JIRA 5.2 is acually showing me correct date on PostgreSQL.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.