From: Stuart Clarke Date: 2010-08-21T06:46:11+09:00 Subject: Re: Dealing with dates & timezones Brian Candler wrote: > > Just sub out the "o'clock" and you should be fine. > >>> require 'time' > => true >>> t = Time.parse("Sunday, 15 August 2010 05:46:50 BST") > => Sun Aug 15 05:46:50 +0100 2010 >>> t.gmtime > => Sun Aug 15 04:46:50 UTC 2010 >>> t.localtime > => Sun Aug 15 05:46:50 +0100 2010 >>> t.zone > => "BST" > >> I want basically out these dates as follows, applying the necessary time >> zone bias: >> >> 15/08/2010 06:46:50 (because it is BST we add the hour) > > I think you have made a mistake there. > > If the time is 05:46:50 BST, as the original string said, then that's > the time in BST. > > Since BST is GMT+1 (in the summer anyway), then the time is also > 04:46:50 in GMT. > > It is 06:46:50 local time in France (Western European Time, GMT+2 in > summer) > > HTH, > > Brian. Yeah sorry, got my words tangled up regarding + and - of hours. I will give this a try. Many thanks -- Posted via http://www.ruby-forum.com/.