I'm trying to format date from java.util.Date. I need this format:
2016-06-10T13:38:13.687+02:00
.
How correctly convert this from standard Date format
May 04 09:51:52 CDT 2009
?
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss z", Locale.getDefault());
sdf.format(new Date());
This code unfortunately return value without +02:00
.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…