Time setting and file.lastModified () strange questions
1 In the system settings app in the native, the time to adjust to future 2 write in their own document management app, the new file on the sd card 3 View file.lastModified () is correct 4.adb reboot 5. Then view file.lastModified () more than the correct time of 8 hours Note: The log is found throughout the area east of eight, time to adjust to the past will not happen, it is difficult to understand, ah, no means of positioning, which seniors pointing 12. Method creates files created: final File file = new File (filePath);<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) -> Reply:
The reply was deleted at the moderator 2011-12-28 10:32:47
Reply: Dinga own Reply: Normal, because we are eight districts in the East, then the system time is GMT time, which is GMT New files are then calls the default time zone editor java last time, and we are Beijing, eight districts in East Reply:
When viewing before the modification time zone is east eight districts. Look after the restart time zone, or the East eight districts. Reply:
You can change the time zone in the settings Reply:
My question is around the time zones have not changed, why the modification time into the future, and then create a new file, reboot, lastModified file more than eight hours on? Before the new file modification time is not the problem, After the last modification time to the new problem is not the problem. Reply:
The current time zone is already eight districts of the East, but also why the java editor last time time zone default tune it? Virtual machines can also get the current time zone with the default time zone, justified ah? ! Reply: Do not understand, you use examples illustrate this problem, we might be able to think quickly on the root of the problem Reply:
This is just a small problem, you do not have too tangled, which with your project needs any conflict, if not, the next time you use the correct time zone as long as you can, in fact, you do not control the time zone, usually displayed with the default time zone time Reply:
with the default time zoneI would not have come not tangle it asked. Although this is a small problem, but the test provides a single hanging in my name, resolved not to resolve the leadership can be seen, for me is very important. Brother, do not pull the time zone, the time zone is always correct:
file.lastModified () sent 28800000 milliseconds which is eight hours before the restart and get the timestamp after the restart. In the end you know the cause of this problem. Reply:
No comments:
Post a Comment