From: Dan Quach Date: 2012-08-30T09:32:15+09:00 Subject: how do extract timezone from datetime object? I'm working on an external interface where a partner website is giving us date time as strings. >> dt = DateTime.parse( "Wed, 29 Aug 2012 17:26:44 -0700" ) => Wed, 29 Aug 2012 17:26:44 -0700 >> dt.strftime( "%z" ) => "-0700" What I have to do is extract the UTC time zone. So in the prior example I need an integer of -7. (UTC-7) in this scenario. Is there some easy way of doing this? thanks! -- Posted via http://www.ruby-forum.com/.