how to parse output of new Date().toString()

That format is specified in the Date#toString().

Converts this Date object to a String of the form:

dow mon dd hh:mm:ss zzz yyyy

So, in SimpleDateFormat pattern terms:

EEE MMM dd HH:mm:ss zzz yyyy

Unrelated to the problem, I wonder if it wasn’t in first place a bad idea to use Date#toString() instead of SimpleDateFormat#format() to output dates. I would consider to fix it straight there.

Leave a Comment