From: Sean Chittenden Date: 2002-04-01T06:32:43+09:00 Subject: Re: Timezone name -> UTC hour offset? > > Is there any way of going from -0800 to (PST|PDT) ? Is there a > > module that does this? -sc > > The simple case of adding 8 hours to time is (assuming you wanted to > check that time was utc, and you want to convert to PST) > > if time.gmt? > t2 = time + 28800 > end > > (8 hours * 60 minutes * 60 seconds = 28800) Thanks for the idea! It ain't pretty, but this works pretty well for converting timezones (ex: "-0800", "-0730", etc...). @date = @date + (("-0730".to_i.abs.divmod(100)[0] * 3600) + ("-0730".to_i.abs.divmod(100)[1] * 60)) Is there any way to increment a time object without creating a new object? Something like a +! or t.add_s!(sec) operator? -sc -- Sean Chittenden