It's all about the answers!

Ask a question

Additional Info on Time perspective for eg on "dc:created"


shalini saini (162027) | asked May 05 '14, 6:39 a.m.
What format does time in dc:created is?
What does z in the end refer to?
What it takes to convert it to some other format in perl for example:
May 1, 2014, 2:53 AM



Comments
Sumant Renukarya commented May 05 '14, 6:52 a.m.

Hi Shalini


Can you provide more details here? 

What product you are referring to? Where in the product is this? 


shalini saini commented May 05 '14, 7:08 a.m.

With reference to:
https://jazz.net/wiki/bin/view/Main/ResourceOrientedWorkItemAPIv2#Adding_a_Comment_to_a_Work_Item
I want to read the value :

c:created":"2009-06-12T13:11:29.331Z",
and display it in format say :
May 1, 2014, 2:53 AM in perl.
Above mentioned questions are asked in this context

2 answers



permanent link
shalini saini (162027) | answered May 05 '14, 6:56 a.m.
With reference to:
https://jazz.net/wiki/bin/view/Main/ResourceOrientedWorkItemAPIv2#Adding_a_Comment_to_a_Work_Item
I want to read the value :
c:created":"2009-06-12T13:11:29.331Z",
and display it in format say :
May 1, 2014, 2:53 AM in perl.
Above mentioned questions are asked in this context


permanent link
Simon Washbrook (67216) | answered May 05 '14, 7:30 a.m.
Hi Shalini,

The format is ISO 8601.
See : http://en.wikipedia.org/wiki/ISO_8601
So:
YYYY-MM-DD "T" hh:mm:ss.ms "Z"
Where T is the separator between date and time
and "Z" is Zulu time zone, or Zero hour offset or UTC.

To convert inPerl to other formats see the Perl module:

DateTime::Format::ISO8601
http://search.cpan.org/~jhoblitt/DateTime-Format-ISO8601-0.08/lib/DateTime/Format/ISO8601.pod

Enjoy,
Simon

Comments
shalini saini commented May 07 '14, 7:39 a.m.

Thanks Simon

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.