Forum: Ruby Re: File.mtime: Bug on Windows?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F3b7b8756d0c7f71cc7460cc33aefaee?d=identicon&s=25 Berger, Daniel (Guest)
on 2006-03-31 18:16
(Received via mailing list)
> I think, there is a bug in File.mtime, unfortunately:
>
> Using:
>   ruby 1.8.4 (2005-12-24) [i386-mswin32]
>   Windows XP with NTFS filesystem
>
> When reading File.mtime( 'any existing filename'),
> the result is different by one hour, when doing this with the
> computer clock set to a daylight saving time (DST) and doing this
> with the computer clock set to a standard time.

The bug, if you are correct, is in the Windows' implementation of _stat
(or _stat64).

I think your best bet is, perhaps using the Perl module as a baseline,
to submit a patch to win32.c to ruby-core, keeping in mind that future
versions of Windows just might fix this bug.

Regards,

Dan
A0a1ccb374080e5387f524ae6105d8b1?d=identicon&s=25 Axel Friedrich (Guest)
on 2006-04-02 19:10
(Received via mailing list)
Hello Dan,

> I think your best bet is, perhaps using the Perl module as a
> baseline, to submit a patch to win32.c to ruby-core,

I think, you are right. Sorry to say, that I don't know programming
perl nor any kind of c. So I think, I'll not succeed in doing this.
(Most of Ruby-programming I do at home, just for fun. Only
occasionally, I use Ruby in my office for making my job somewhat
easier... .)

Regards,

Axel
This topic is locked and can not be replied to.