Reputation: 160
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
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
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
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