Java tutorial
//package com.java2s; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; public class Main { public static String getUserPhoneTimezone() { TimeZone timeZone = TimeZone.getDefault(); timeZone = timeZone.getTimeZone(timeZone.getID()); Date date = new Date(); DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); df.setTimeZone(timeZone); return df.format(date); } }