Use DateFormat. For example,
SimpleDateFormat isoFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
isoFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
Date date = isoFormat.parse("2010-05-23T09:01:02");
More Related Contents:
- Why is subtracting these two times (in 1927) giving a strange result?
- How to get the day from timezone in java [duplicate]
- Calculating the difference between two Java date instances
- How can I get the current date and time in UTC or GMT in Java?
- Dates with no time or timezone component in Java/MySQL
- Convert java.util.Date to String
- Java SimpleDateFormat(“yyyy-MM-dd’T’HH:mm:ss’Z'”) gives timezone as IST
- How to tackle daylight savings using TimeZone in Java
- Date and time conversion to some other Timezone in java
- java Calendar, Date, and Time management for a multi-timezone application
- Is java.util.Date using TimeZone?
- Java: How do you convert a UTC timestamp to local time?
- How to subtract X day from a Date object in Java?
- Calculating the difference between two Java date instances
- Timezones in SQL DATE vs java.sql.Date
- What is the default timezone in java.util.Date
- What time zone does Date.toString() display?
- Getting the current time millis from device and converting it into a new date with different timezone [duplicate]
- How to Parse Date from GMT TimeZone to IST TimeZone and Vice Versa in android
- Why is the month changed to 50 after I added 10 minutes?
- Strange Java Timezone Date Conversion Problem
- Java 8: Calculate difference between two ZonedDateTime
- Why is subtracting these two epoch-milli Times (in year 1927) giving a strange result?
- Why is the Java date API (java.util.Date, .Calendar) such a mess?
- Should I use Java date and time classes or go with a 3rd party library like Joda Time?
- Parsing dates of the format “January 10th, 2010” in Java? (with ordinal indicators, st|nd|rd|th)
- Getting unix timestamp from Date()
- getting the difference between date in days in java [duplicate]
- Convert string to Date in java
- How create Date Object with values in java