I am experimenting with ZipEntry.getTime() on Android. However I am seeing different results on different devices for the SAME zip&file: 1419755996000, 1419752396000, 1419730796000, 1419770396000, 1419737996000, 1419745196000, 1419759596000, ...
Differences from my device in hours are as follows: +2h, +1h, -5h, +6h, -3h, -1h, ...
These numbers are obtained from real devices around the world by means of analytics&logging. Since I am using the long result of getTime() directly I am not expecting for the timezone to matter.
How can these differences by explained and what can I do to obtain a uniform result on all devices ?
Inside a zip file, the date and time of each entry are stored as a year, month, day, hour, minute and second, coded up into a long
value. No timezone is specified. When this is converted to a Java Date
(which represents an instant in time) in the course of the getTime()
method, it is converted according to the system timezone.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments