I need to parse DateTime string coming from AppEngine in Java (Android). The string looks like this: 2011-07-26 17:21:00+01:00
. Is it some standard format? Is there simpler way than using custom SimpleDateFormat
?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How can I create this custom Bottom Navigation on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
What can be simpler than SimpleDateFormat in that case? You just have to get rid of that last nasty
:
in the timezone part.Edit: The format is very close to a standard format.
This will get rid of the last nasty
:
, and parse the date:SimpleDateFormat
is pretty simple except that for the fact that your date string is a bit off because of the last:
in there. Just replace the:
and use the following pattern: