From: Kero van Gelder Date: 2001-07-16T23:51:29+09:00 Subject: [ruby-talk:17928] Re: Time vs ParseDate > |Why doesn't Time accept the output from ParseDate.parsedate directly? > | > |Like > | Time.gm(ParseDate.parsedate("Mon Jul 16 2001 GMT")) > > Sorry for inconvenience. Try this: > > Time.gm(*ParseDate.parsedate("Mon Jul 16 2001 GMT")[0..4]) > # => Mon Jul 16 12:00:00 UTC 2001 Not bad, but now I happen to have date which is given as a string by a remote client (via http), which must be used to determine whether a document has changed (and needs to be resent). Control downto seconds would be nice, I think. Bye, Kero. PS: Yes, I am writing an http daemon in Ruby. Aimed at security. Nice exercise. +--- Kero ------------------------------ kero@chello.nl ---+ | Don't split your mentality without thinking twice | | Proud like a God -- Guano Apes | +--- M38c ------- http://members.chello.nl/~k.vangelder ---+