Java tutorial
//package com.java2s; import android.annotation.SuppressLint; import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; public class Main { @SuppressLint("SimpleDateFormat") public static String getTimeStringWithGMT(Date date) { SimpleDateFormat dateformat = new SimpleDateFormat("yyyy.MM.dd. aa hh:mm (ZZZZ)"); dateformat.setTimeZone(TimeZone.getDefault()); return dateformat.format(date); } }