Created
December 17, 2014 12:26
-
-
Save devrath/7b4886d8c61e5c987b07 to your computer and use it in GitHub Desktop.
Indian UTC time ZONE conversion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| String date=jsonobject.getString("needbydate"); | |
| DateFormat df = new SimpleDateFormat("MMM/dd/yyyy",Locale.ENGLISH); | |
| df.setTimeZone(TimeZone.getTimeZone("UTC")); | |
| DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ss",Locale.ENGLISH); | |
| sdf.setTimeZone(TimeZone.getTimeZone("UTC")); | |
| Date startDate; | |
| startDate = sdf.parse(date); | |
| needbydate = df.format(startDate).toString()+""; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment