It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

update jira rest api datetime value

im using jira rest api to create/edit issues. when updating datetime type fields its giving an error somthing like

"Error parsing time: 2013-06-17T00:00:00+0000"

datetime required ISO8601 format, so i'm using it, but keep getting this error

how can i do this? plz help

thanks in advance

3 answers

1 accepted

2 votes
Answer accepted

The format for ISO 8601:
YYYY-MM-DDThh:mm:ss.sTZD
Try using 2013-06-17T00:00:00.0+0000
instead of
2013-06-17T00:00:00+0000


sauce:
https://developer.atlassian.com/display/JIRADEV/JIRA+REST+API+Example+-+Create+Issue#JIRARESTAPIExample-CreateIssue-Examplesofcreatinganissue

I have to object, the date format is *not* ISO 8601. The timezone offset is incorrect. The date time is in extended format but the tz offset is not. Thus, the value is illegal.

Can we file a bug about that?

Hi, I just stumbled across this but I think what is happening is that you are returning a date field and so all the other values for hours seconds AND the time zone offset are all zero.  If you need the time zone offset to be correct, you need to change the custom field type (or field type) to be one that has date and time as opposed to just date.

i tried this format, but problem persists, im using php thanx for the help

static final String JIRA_MISTERY_DATE_FORMAT = "yyyy-MM-dd hh:mm a";

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you