From: Philipp Meier Date: 2002-07-24T21:27:52+09:00 Subject: ParseDate and Time --ZGiS0Q5IWpPtfppv Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, how can I parse a Date from a String into a Time object? I tried the following but the timezone seems to be ignored: irb(main):012:0> t =3D ParseDate.parsedate("Tue, 16 Jul 2002 21:25:08 +020= 0") [2002, 7, 16, 21, 25, 8, "+0200", 2] irb(main):013:0> Time.gm(t[5],t[4],t[3],t[2],t[1],t[0],nil,nil,nil,t[7]) Tue Jul 16 21:25:08 UTC 2002 irb(main):014:0> Time.local(t[5],t[4],t[3],t[2],t[1],t[0],nil,nil,nil,t[7]) Tue Jul 16 21:25:08 CEST 2002 irb(main):015:0> Time.local(t[5],t[4],t[3],t[2],t[1],t[0],nil,nil,nil,"+030= 0") Tue Jul 16 21:25:08 CEST 2002 irb(main):016:0> Time.gm(t[5],t[4],t[3],t[2],t[1],t[0],nil,nil,nil,"+0300") Tue Jul 16 21:25:08 UTC 2002 irb(main):017:0>=20 The only way to change the timezone I found is using either #gm or #local but then I'm stuck to my local timezone. Any help would be appreciated, -billy. --=20 Meisterbohne S=F6flinger Stra=DFe 100 Tel: +49-731-399 499-0 eL=F6sungen 89077 Ulm Fax: +49-731-399 499-9 --ZGiS0Q5IWpPtfppv Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9Pp1IfBriNoqItSYRAhSOAJ9/yrnl4nkWPDanOS8riiIel7bhWQCfXY1y W+eF5NaoHFniAkPyaD8bJVY= =rQHL -----END PGP SIGNATURE----- --ZGiS0Q5IWpPtfppv--