Java tutorial
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Locale; import java.util.TimeZone; public class Main { public static SimpleDateFormat getDateTimeFormat() { SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss", Locale.US); format.setTimeZone(TimeZone.getTimeZone("UTC")); return format; } }