Open j2043 opened 13 years ago
Hi there. Thanks for bringing this to light. I believe this might have been fixed in the recent release with the bugfix on leap year parsing by @mschulkind
I'll leave this ticket open until it's confirmed though, if you have time to check it out that'd be fantastic. I've pushed the newest gem live to rubygems.
Is there a reliable way of knowing the server's time offset? Specifying a manual offset option in .parse
might be needed to solve this reliably.
I'm in PST (-08:00), and selecting a file from our Chicago server (2 hours ahead) shows "2012-12-18 12:00:00" in the raw string, but the parsed ruby time is reported as 2012-12-18 12:00:00 -0800.
I believe the Transmit Mac FTP client uses a technique by uploading a temporary file and checking what mtime it reports vs. the local system time. That could be a feature to consider: monkey patch Net::FTP with utc_offset = ftp.determine_utc_offset
?
If you retrieve a file off a ftp server on the east coast from a server on the west coast the date on the file may very well be in the future. The code for time parsing look like it assumes times in the future are from the previous year.
This may be a will never fix and I'm ok with that. I just thought you might like to know about this edge case.