From tim at red56.co.uk Thu Aug 5 06:02:30 2010 From: tim at red56.co.uk (Tim Diggins) Date: Thu, 5 Aug 2010 11:02:30 +0100 Subject: [TZInfo-users] tzinfo VERSION Message-ID: <025FB894-7E3B-4E22-8078-7BB11D39223C@red56.co.uk> Hi Philip / tzinfo-users I've been using tzinfo for a few years within permatime.com, many thanks (again) for the excellent work. I'd like to be able to determine programmatically which version of tzinfo (and ideally also the version of the tz database, though this can be looked up in the tzinfo readme) the web page is using. Is there an obvious way of doing this that I'm missing? Ideally a TZInfo::VERSION would be ideal, and maybe a TZInfo::VERSION_COMMENT (for info about the tz database similar to what's in the README). I can roughly see how I might add this to the Rakefile -- if I could do such a patch, would you be interested in it folding it in to your release process? all the best Tim Tim Diggins http://red56.co.uk http://permatime.com From phil.ross at gmail.com Thu Aug 5 08:38:57 2010 From: phil.ross at gmail.com (Philip Ross) Date: Thu, 5 Aug 2010 13:38:57 +0100 Subject: [TZInfo-users] tzinfo VERSION In-Reply-To: <025FB894-7E3B-4E22-8078-7BB11D39223C@red56.co.uk> References: <025FB894-7E3B-4E22-8078-7BB11D39223C@red56.co.uk> Message-ID: Hi Tim, On 5 August 2010 11:02, Tim Diggins wrote: > I'd like to be able to determine programmatically which version of tzinfo (and ideally also the version of the tz database, though this can be looked up in the tzinfo readme) the web page is using. There isn't anything in TZInfo that will return either the tzinfo version number or the tz database version. However, if you are using the gem, then you can ask RubyGems for the loaded version: Gem.loaded_specs['tzinfo'].version.to_s > Ideally a TZInfo::VERSION would be ideal, and maybe a TZInfo::VERSION_COMMENT (for info about the tz database similar to what's in the README). I can roughly see how I might add this to the Rakefile -- if I could do such a patch, would you be interested in it folding it in to your release process? I'd be happy to accept a patch to add this functionality. Regards, Phil