Take the tour ×  This question relates to Unix-like-systems and
C. If you don't happen to have an answer, you can still help by:
1. making your best guess,   2. suggesting a methodology that
works to quickly answer a question as specific as this.  Steps
to reproduce:    1. Create a new file on Android 4.2.1 at
/sdcard/file.txt. From adb shell, note the time it was created
by calling date and also double-check with ls -l on the file.
2. Copy-paste code described from the page for stat   3. Compile
then run the program from adb shell with input argument for
/sdcard/file.txt.  The output from this <sys/stat.h> program
consistently shows the file is +5 hrs. off from the time it was
actually created (noted at step 1)!  This holds for every "time"
field on the struct stat. Can someone please explain this
difference between what Android's <sys/stat.h> function says and
the file's actual last modified time?  share|improve this
question Perhaps the time on adb shell is different from your
local time? Does the tim