i want to calculate how long since one file been modified. but i met some problem can u help me?? [message #66226] |
Tue, 28 April 2009 23:38 |
stin.wang
Messages: 15 Registered: April 2006
|
Junior Member |
|
|
code as following
IDL> ldf_info = file_info("d:\noaa_ldf")
IDL> print,systime(0,ldf_info.mtime)
Wed Apr 29 14:11:47 2009
IDL> time_ldf = systime(1,ldf_info.mtime,/seconds)
IDL> time_local = systime(1,/seconds)
IDL> print,systime()
Wed Apr 29 14:12:53 2009
IDL> print,time_local-time_ldf
52.140000
i was confused because i add a file in d:\noaa_ldf, then the time was
Wed Apr 29 14:11:47 2009, so i convert it into seconds, so i can
calculate time now by time when the directory was created. so
it should be 66 seconds, but the idl shows 52.14, and 52+14=66, it's
just a coincidence?? how to solve it??
|
|
|