I want to store dates in my Cloud database all under one time-zone and then for all my users (whose Android devices could be anywhere in the world), I want that date to be converted and displayed for them with whatever their default Android settings are.
Here it shows how to store dates as a long with Java in code using this:
System.currentTimeMillis()
1) However, how do I "normalize" the date to be UTC (this is what I hear everyone saying I should do)?
2) Then, after that date is retrieved from the Cloud DB, how do I with Java convert that UTC date to whatever the time-zone of the device the app is installed on is?
From what I gather, Android might do some of this stuff automatically, but I am not sure what - and I am not sure what I myself have to do. Could someone clarify the above for me?
Thanks.