Issue Type: Bug Bug
Affects Versions: JRuby 1.7.2
Assignee: Thomas E Enebo
Components: Ruby 1.9.3
Created: 13/Jan/13 9:28 PM
Description:

Procedure:

1. Ensure that your time zone is set to one which uses daylight savings.

2. Create two files, one during daylight savings and one not. In my case, I just used "touch" to do this:

Z:\Data\JRuby>touch -t "201208311416" "created during standard time.txt"
Z:\Data\JRuby>touch -t "201212311416" "created during daylight time.txt"

3. Verify that the dates have been set correctly (I verified this in Explorer first, but just so that I have something I can copy in here, I'm using ls as well.)

-rw-r--r--    1 Daniel   Administ        0 Dec 31 14:16 created during daylight time.txt
-rw-r--r--    1 Daniel   Administ        0 Aug 31 14:16 created during standard time.txt

4. Run this Ruby script under JRuby:

Unable to find source-code formatter for language: ruby. Available languages are: _javascript_, sql, xhtml, actionscript, none, html, xml, java
puts 'created during standard time.txt'
puts File.mtime('created during standard time.txt')
puts 'created during daylight time.txt'
puts File.mtime('created during daylight time.txt')

5. Witness what happens:

created during standard time.txt
2012-08-31 15:16:00 +1000
created during daylight time.txt
2012-12-31 14:16:00 +1100

File.mtime has returned a date one hour too far in the future for the file created during standard time. Presumably it has taken the UTC time on the file and then applied the current time zone of +11:00 instead of using the time zone of "Australia/Sydney".

Environment: Windows 8 (whether this is OS-specific is unknown)
Project: JRuby
Priority: Major Major
Reporter: Trejkaz
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

Reply via email to