KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I need to get time difference between two dates in different time zones. Currently I am doing this: Calendar c1=Calendar.getInstance(TimeZone.getTimeZone("EDT")); Calendar c2=Calendar.getInstance(TimeZone.getTimeZone("GMT")); String diff=((c2.getTimeInMillis()-c1.getTimeInMillis())/(1000*60*60))+" hours"; new AlertDialog.Builder(this).setMessage(diff).create().show(); I get 0 hours. What am I doing wrong?
Tags (comma-separated)
Save Edits
Cancel