Java tutorial
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Locale; import java.util.TimeZone; public class Main { public static final String API_DATE_FORMAT = "yyyy-MM-dd"; private static SimpleDateFormat getApiSimpleDateFormat() { SimpleDateFormat simpleDateFormat = new SimpleDateFormat(API_DATE_FORMAT, Locale.getDefault()); simpleDateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); return simpleDateFormat; } }