SCORM 2004 Timestamp Requires Milliseconds with TDZ (Time Zone Designator).


Where does this problem show up?

This timestamp format problem is relevant to SCORM 2004 API calls when creating interactions and comments: cmi.interactions.n.timestamp and cmi.comments_from_learner.n.timestamp.

What's a Time Zone Designator (TDZ)?  

Suffix at the end of a timestamp in the form Z for UTC or +hh:mm or –hh:mm.

Where's the confusion? 

Timestamps can take a form "2009-07-25T03:00:00".  So you would naturally think that you could append a TDZ to the end like "2009-07-25T03:00:00Z" or "2009-07-25T03:00:00+05:00", right?  Well, the SCORM 2004 spec puts an extra requirement on you when specifying a TDZ.

From SCORM® 2004 4th Edition Run-Time Environment (RTE) Version 1.0, page RTE-A-16 under "time(second,10,0)"

If TZD is defined, then hh:mm:ss.s shall also be defined, although they may be all zeros.


  • "2009-07-25T03:00:00+05:00"    WRONG
  • "2009-07-25T03:00:00.0+05:00"   OK
  • "2009-07-25T03:00:00Z    WRONG
  • "2009-07-25T03:00:00.0Z"   OK

But the spec has an example that shows TDZ without the milliseconds -- what gives?

The spec shows a set of examples timestamps, two of which are invalid.  These bad examples are contrary to the spec definition and fail in the actual SCORM Conformance test suite.

• 2009
• 2009-07-25T03:00:00
• 2009-07-25T03:00:00-03:10
• 2009-07-25T03:30:35.5+05
• 2009-07-25T03:00:00Z'
Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request


  • Avatar
    Mark Statkus

    The cmi.interactions.9.timestamp value of '2012-03-06T12:44:42.1-8:00' is not a valid time type.

    Would this error out in SCORM 2004 3rd Edition still?




  • Avatar
    John Hayden

    The SCORM 2004 3rd edition RTE spec notes the same requirement -- it would error out in the same way. 

    The SCORM 2004 2nd edition documentation for time (second, 10, 0) does not call this requirement out specifically and I'm not sure whether the test suite explicitly tests for this, but the SCORM Engine enforces this requirement for 2nd edition just the same as 3rd and 4th.

  • Avatar
    Mark Statkus

    Ok, looks like based on that then after I check my eyes I need to pad the hours from GMT with a zero.  Thanks John.

Powered by Zendesk