special_cheese
special_cheese

Reputation: 160

What is the technical term of the time format of this value "20150716203621.000Z"?

So I have a time value in the format "20150716203621.000Z", I retrieved from an LDAP server, however I am not sure what the format of this time is in? The ultimate goal is to be able to convert it to a Java.Util.Date Object. Does anyone know what the technical term of this format is? Thanks.

Upvotes: 0

Views: 1085

Answers (3)

Bertrand Martel
Bertrand Martel

Reputation: 45362

This is the standard date/time format as specified in RFC 3339, a profile of ISO 8601.

From RFC :

  date-fullyear   = 4DIGIT
  date-month      = 2DIGIT  ; 01-12
  date-mday       = 2DIGIT  ; 01-28, 01-29, 01-30, 01-31 based on
                             ; month/year
  time-hour       = 2DIGIT  ; 00-23
  time-minute     = 2DIGIT  ; 00-59
  time-second     = 2DIGIT  ; 00-58, 00-59, 00-60 based on leap second
                             ; rules
  time-secfrac    = "." 1*DIGIT
  time-numoffset  = ("+" / "-") time-hour ":" time-minute
  time-offset     = "Z" / time-numoffset

Upvotes: 1

Leah
Leah

Reputation: 458

yyyy-mm-ddT00:00:00.000Z

So 20150716203621.000Z is 2015.07.16. 20:36:21 and 000 is milliseconds.

Z means UTC timezone.

Upvotes: 1

M A
M A

Reputation: 72844

It seems to refer to a SimpleDateFormat object. The Z at the end refers to the timezone. See simpledateformat parsing date with 'Z' literal.

Upvotes: 1

Related Questions