[haiku-bugs] Re: [Haiku] #7120: Tracker and Terminal show the wrong file dates on NTFS volume

#7120: Tracker and Terminal show the wrong file dates on NTFS volume
--------------------------------+------------------------------
  Reporter:  Disreali           |        Owner:  3dEyes
      Type:  bug                |       Status:  new
  Priority:  normal             |    Milestone:  R1
 Component:  File Systems/NTFS  |      Version:  R1/Development
Resolution:                     |     Keywords:
Blocked By:                     |  Has a Patch:  0
  Platform:  All                |     Blocking:
--------------------------------+------------------------------

Comment (by bonefish):

 Replying to [comment:5 korli]:
 > The code should look like the following, unless I miss something.
 ntfs2timespec is available in ntfstime.h.
 > {{{
 >     stbuf->st_atim = ntfs2timespec(ni->last_access_time);
 >     stbuf->st_mtim = ntfs2timespec(ni->last_data_change_time);
 >     stbuf->st_ctim = ntfs2timespec(ni->last_mft_change_time);
 > }}}

 Agreed. NTFS times seem to be in 1/10 microseconds with another base, so
 some kind of conversion is needed. And although ATM it is not strictly
 necessary to set the nanoseconds fields (the [http://dev.haiku-
 os.org/browser/haiku/trunk/src/system/kernel/fs/vfs.cpp?rev=40238#L6264
 VFS clears them]) the suggested solution also makes use of the additional
 precision, which is definitely the best thing to do.

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/7120#comment:6>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: