Hi,,
Kevin Smith <sent / qualitycode.com> wrote
| Any hints?
require 'parsedate'
class Time
def Time.parse( timestr )
year, month, day, hour, min, sec, zone, wday =
ParseDate.parsedate( timestr )
tm = Time.gm( year, month, day, hour, min, sec )
return tm unless zone
return tm if zone.to_i == 0
hour = zone[0,3].to_i * 3600
min = zone[3,2].to_i * 60
ofs = (hour + min)
return Time.at( tm.to_f - ofs )
end
end
sample = "Thu, 21 Dec 2000 07:43:29 +0900"
tm = Time.parse( sample )
--
ARIMA Yasuhiro <fit0298 / fitec.co.jp>