Project

General

Profile

Actions

Feature #13726

closed

PATCH: Windows builds - fractional second file times

Added by MSP-Greg (Greg L) over 7 years ago. Updated almost 7 years ago.

Status:
Closed
Target version:
-
[ruby-core:81946]

Description

At present, I believe Windows builds have integer seconds resolution on File times.

Attached are three patches that seem to correct the issue. The numbered patches are best applied in order.

The c source patches were created by kubo (Kubo Takehiro); I created the spec patch, along with some testing.

All related tests (run parallel) pass on my system for MinGW builds and x64-mswin64_140 builds. I did some checks with Appveyor, and there may be issues with the logger tests, due to the fact that the tests are very time sensitive (I ran -j3 on a quad system, Appveyor runs -j2 on a dual core).

I believe file time values are stored with 100 ns resolution, but times have 100 µs resolution. This was the reason for some of the changes to the tests, as time appears to be truncated (floor), as opposed to round.

I would appreciate if consideration could be given to adding this (or similar) code. Thank you.


Files

02-file-utime.patch (5.53 KB) 02-file-utime.patch MSP-Greg (Greg L), 07/07/2017 02:25 AM
spec-rubyspec-core-file-time.patch (2.99 KB) spec-rubyspec-core-file-time.patch MSP-Greg (Greg L), 07/07/2017 02:25 AM
01-time-subsec.patch (15.2 KB) 01-time-subsec.patch MSP-Greg (Greg L), 07/07/2017 02:25 AM
spec-rubyspec-core-file-time.patch (3.28 KB) spec-rubyspec-core-file-time.patch Updated utime MSP-Greg (Greg L), 07/11/2017 02:42 PM

Related issues 2 (0 open2 closed)

Related to Ruby master - Misc #13702: TZ checking in rb_w32_fstati64()Closedusa (Usaku NAKAMURA)Actions
Related to Ruby master - Feature #13731: inode for Windows on ReFSClosedusa (Usaku NAKAMURA)Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0