below is my android code by which I need to get the timestamp value(value is coming from web server) in New York timezone. Please help me out because system is converting time to server timezone.
long startTime = Long.valueOf(appObj.getString("Unix_timestamp"))*1000;
Date fromDateObj = new java.util.Date(startTime);
SimpleDateFormat sdf = new SimpleDateFormat();
sdf.applyPattern("HH");
fromHour = Integer.valueOf(sdf.format(fromDateObj));
sdf.applyPattern("mm");
fromMin = Integer.valueOf(sdf.format(fromDateObj));
Thanks in advance….
You can specify desired timezone for
SimpleDateFormat: