Updating JIRA Date/Time formats externally

Still need help?

The Atlassian Community is here for you.

Ask the community

This article only applies to Atlassian's server products. Learn more about the differences between cloud and server.

Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

Problem

At times when the administrators wish to edit the date/time format externally - not via Administration >> System >> Look and feel - they can do so by using REST API or direct modification to the database.

Resolution

REST API

Send a PUT request to /rest/api/2/application-properties/\{id\}. For example:

curl -k -D- -u username:password -X PUT --data '{"value" : "HH:mm"}' -H "Content-Type: application/json" <BaseURL>/rest/api/2/application-properties/jira.lf.date.time

(info) This will modify the Time Format to HH:mm. The default value is h:mm a

 

Database query

The following query will return the current date/time formats.

select pe.entity_name, pe.property_key, ps.propertyvalue from propertyentry pe, propertystring ps where pe.id = ps.id and pe.property_key like '%.date.%'

Edit the database accordingly and restart JIRA.

Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

Last modified on Jan 4, 2017

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.