utime bug help?

A

Axel Friedrich

Hello,

in some cases, utime does not set the mtime correctly. AFAIK, this
bug is known for quite a while. - Anybody knows, if it will be fixed
in the near future or if there is a patch or any other help?

I could not find help in the archive of this newsgroup, even this:
http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/24
9839f5de0c6278/f30f387c97157f50
seems not to help in my case. I also could not find it in the
bugtracker,
http://rubyforge.org/tracker/?group_id=426 .


Ruby-Version: ruby 1.8.2 (2004-12-25) [i386-mswin32]
on Windows 98SE


Code I use to identify the bug:

# create a file
fileName = "c:/test.txt"
puts( fileName )
File.open( fileName, "w" ) {|file| file.write( "test bla bla") }


puts "\n--- The following time is daylight saving time ---"
mtime1 = Time.at(1089870492)
puts mtime1
File.utime( Time.now, mtime1, fileName )
mtime2 = File.mtime( fileName )
puts mtime2

puts "\n--- The following time is _not_ daylight saving time ---"
mtime1 = Time.at( 1135539956 )
puts mtime1
File.utime( Time.now, mtime1, fileName )
mtime2 = File.mtime( fileName )
puts mtime2


Returns:

c:/test.txt

--- The following time is daylight saving time ---
Thu Jul 15 07:48:12 (MEZ) - Mitteleurop. Sommerzeit 2004
Thu Jul 15 06:48:12 (MEZ) - Mitteleurop. Sommerzeit 2004 <- Not OK!

--- The following time is _not_ daylight saving time ---
Sun Dec 25 20:45:56 (MEZ) Mitteleuropäische Zeit 2005
Sun Dec 25 20:45:56 (MEZ) Mitteleuropäische Zeit 2005


I would like to know, if it will be fixed in the near future or if
there is a patch or any other help?

Axel
 
N

nobuyoshi nakada

Hi,

At Tue, 1 Nov 2005 05:42:12 +0900,
Axel Friedrich wrote in [ruby-talk:163542]:
in some cases, utime does not set the mtime correctly. AFAIK, this
bug is known for quite a while. - Anybody knows, if it will be fixed
in the near future or if there is a patch or any other help?

I guess it has been fixed:

Tue May 17 11:52:18 2005 NAKAMURA Usaku <[email protected]>

* win32/win32.c (unixtime_to_filetime): use localtime() instead of
gmtime() when using FileLocalTimeToFileTime().
 
A

Axel Friedrich

I guess it has been fixed:

Tue May 17 11:52:18 2005 NAKAMURA Usaku <[email protected]>

* win32/win32.c (unixtime_to_filetime): use localtime()
instead of
gmtime() when using FileLocalTimeToFileTime().


Thank You, Nobu. So will wait for the Ruby 1.8.3-One-Click
Installer... .

Axel
 
C

Curt Hibbs

Thank You, Nobu. So will wait for the Ruby 1.8.3-One-Click
Installer... .

There's not going to be a 1.8.3 One-Click installer, because 1.8.4 is
going to be out in a couple months, and we are concentrating our time
on that.

Curt
 
A

Axel Friedrich

There's not going to be a 1.8.3 One-Click installer, because
1.8.4 is going to be out in a couple months, and we are
concentrating our time on that.

Curt

Thank You for this info. I like the One-Click Installer very much; it
makes the things so much easier... .

Axel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top