import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;
public class Main {
Date date
= sdf.
parse("2013-09-29T18:46:19Z");
// In JVM's timezone and default format as returned by Date#toString
// In UTC and custom format
sdf.
setTimeZone(TimeZone.
getTimeZone("Etc/UTC")); String strDate
= sdf.
format(date
);
// In India and custom format
sdf.
setTimeZone(TimeZone.
getTimeZone("Asia/Kolkata")); strDate = sdf.format(date);
}
}
aW1wb3J0IGphdmEudGV4dC5QYXJzZUV4Y2VwdGlvbjsKaW1wb3J0IGphdmEudGV4dC5TaW1wbGVEYXRlRm9ybWF0OwppbXBvcnQgamF2YS51dGlsLkRhdGU7CmltcG9ydCBqYXZhLnV0aWwuTG9jYWxlOwppbXBvcnQgamF2YS51dGlsLlRpbWVab25lOwoKcHVibGljIGNsYXNzIE1haW4gewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4oU3RyaW5nW10gYXJncykgdGhyb3dzIFBhcnNlRXhjZXB0aW9uIHsKCQlTaW1wbGVEYXRlRm9ybWF0IHNkZiA9IG5ldyBTaW1wbGVEYXRlRm9ybWF0KCJ5eXl5LU1NLWRkJ1QnSEg6bW06c3NYWFgiLCBMb2NhbGUuRU5HTElTSCk7CgkJRGF0ZSBkYXRlID0gc2RmLnBhcnNlKCIyMDEzLTA5LTI5VDE4OjQ2OjE5WiIpOwoKCQkvLyBJbiBKVk0ncyB0aW1lem9uZSBhbmQgZGVmYXVsdCBmb3JtYXQgYXMgcmV0dXJuZWQgYnkgRGF0ZSN0b1N0cmluZwoJCVN5c3RlbS5vdXQucHJpbnRsbihkYXRlKTsKCgkJLy8gSW4gVVRDIGFuZCBjdXN0b20gZm9ybWF0CgkJc2RmLnNldFRpbWVab25lKFRpbWVab25lLmdldFRpbWVab25lKCJFdGMvVVRDIikpOwoJCVN0cmluZyBzdHJEYXRlID0gc2RmLmZvcm1hdChkYXRlKTsKCQlTeXN0ZW0ub3V0LnByaW50bG4oc3RyRGF0ZS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