I need date and time on action by user.
But getting device date/time will not workout because we can manually adjust our device date/time.
We can do API for that.
But I think there will be some open source API to get Date/Time by location or any other go. Please direct me. Thank You
TimeZone Conversion
try
{
String ourDate = "2018-10-17T06:36-04:00";
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mmXXX");
formatter.setTimeZone(TimeZone.getTimeZone("EST"));
Date value = formatter.parse(ourDate);
SimpleDateFormat dateFormatter = new SimpleDateFormat("EE, MMM,dd,yyyy'Z'hh:mm aa");
dateFormatter.setTimeZone(TimeZone.getDefault());
ourDate = dateFormatter.format(value);
}
catch (Exception e)
{
ourDate = "00, 000,00,0000'Z'00:00 00";
}
return ourDate;