search for: tzinfo

Displaying 20 results from an estimated 151 matches for "tzinfo".

Did you mean: tsinfo
2009 Mar 13
1
TZInfo included in Rails 2.2.2 vs. version on RubyForge
I downloaded version 0.3.12 of TZInfo from [1], and observed that it has a very robust set of timezones including, for example, ''America/ Anchorage'': irb(main):001:0> require ''rubygems'' => false irb(main):002:0> require ''tzinfo'' => true irb(main):003:0> TZInfo::Timez...
2006 Apr 24
2
Session Restore Problem
...en restart the server, I get the following error unless I restart my web browser (or delete session files): Session contains objects whose class definition isn''t available. Remember to require the classes for all objects kept in the session. (Original exception: uninitialized constant TZInfo [NameError]) I know what the problem is. Rails hasn''t loaded "TZInfo::Timezone" class definition yet so it doesn''t know how to handle "TZInfo::Timezone" object stored in the session. If an ActiveRecord model is saved in the session, using "model&q...
2006 Jan 04
2
Using gems from vendor/ ?
Maybe someone here can help me out. I''ve unpacked tzinfo in to my vendor/ directory using "gem unpack tzinfo" and got a vendor/tzinfo-0.1.1 directory as a result. How can I require this gem in my app? I''m trying to use a require line in my environment.rb but no matter what I do Rails seems to look for a locally installed copy in /...
2005 Oct 19
1
TZInfo::Timezone problem selected value
hey, i have a record in the database gtm_zone with value ''Europe/London'' i want to have a select box with all the zones and the corrected selected @firm.gmt_zone = Europe/London TimeZone from ruby (trying to expand with TZinfo) dont want to select Europe/London, and not sorted <select id="firm_gmt_zone" name="firm[gmt_zone]"> <%= time_zone_options_for_select(selected = @firm.gmt_zone, priority_time_zones = nil, model = TZInfo::Timezone) %><br /> </select> the selectlist f...
2007 Apr 19
1
Time zone mapping from TimeZone to TZInfo::Timezone
Hi. Using this: <%= time_zone_select("account", "time_zone" %> I get a list of time zones options, like eg.: <option value="Athens">(GMT+02:00) Athens</option> But as I''m using TZInfo::Timezone, I need to map ''Athens'' to ''Europe/Athens'' I can see that the mapping I''m looking for is present in the tzinfo_timezone plugin, but I cannot see how to access it. Anyone? Thanks. Morten PS: I''m aware that I could use <%=time_z...
2006 Mar 16
5
TimeZone, TZInfo, daylight savings, and composed_of
...unsigned not null auto_increment, name varchar(50) not null, time_zone varchar(50) not null, ... primary key (id) ) and a class like class Account < AR ... composed_of :time_zone, :class_name => TimeZone, :mapping => %w(time_zone name) end There also seems to be a TZInfo library that supports daylight savings. It seems strange that the TimeZone class in rails doesn''t support daylight savings as Basecamp from 37Signals uses timezones and I''m sure they would have to support it... interesting. Can anyone shed some light on this. :) Thanks, Zack --...
2007 Jan 28
0
tzinfo on dreamhost - help?
Hey everyone - I googled till my face was blue and finally managed to update my setup at dreamhost to run "local" gems. Installed the tzinfo gem from a mirror and updated my app to Rails edge. I fired up the console in my app to check if my subsequent install of tzinfo worked out and here''s the output. $ ruby script/console Loading development environment. >> gem ''tzinfo'' => true >> include TZ...
2006 Jun 07
4
Setting default timezone ENV[''TZ'']=''UTC'' not working on windows?
Hi, I''ve been trying to do timezone conversion, and have some trouble getting it to work on my Windows machine. Searching the web, I found http://wiki.rubyonrails.com/rails/pages/HowtoSetDefaultTimeZone ...which explains how to set the default timezone. I''m using an environment.rb that include the lines: ActiveRecord::Base.default_timezone = :utc ENV[''TZ''] =
2007 Feb 28
3
require tzinfo on rails 1.2
I''ve just upgraded rails to 1.2 and now everything breaks when accessing pages that use tzinfo. I get the following errors: uninitialized constant FriendController::Timezone c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:477:in `const_missing'' #{RAILS_ROOT}/app/controllers/friend_controller.rb:22:in `index'' Can someone please tell m...
2007 Apr 03
1
Some timezone trouble involving tzinfo and postgresql
...about the timing with this one. There are a number of excellent articles that I''ve been working off of, in particular this one internet archived version of Scott Barron''s very useful article on the subject that is no longer available at the original URL that is linked to from the TZInfo page: http://web.archive.org/web/20060425190845/http://lunchroom.lunchboxsoftware.com/pages/tzinfo_rails I''m not looking to pull of anything fancy here, but I''ve ended up a bit of a stumper in which utc_to_local appears to be adjusting the UTC- stored time twice. This is what I...
2008 Dec 30
3
integration of tzinfo with icalendar
My interest in icalendar is more on the ical generation side instead of the ical parsing side. As such, I did a bit of work on a tzinfo mixin that will generate the timezone rules based on the tzinfo gem. This lets you do the following: estart = DateTime.new(2008, 12, 29, 8, 0, 0) eend = DateTime.new(2008, 12, 29, 11, 0, 0) tstring = "America/Chicago" tz = TZInfo::Timezone.get(tstring) cal = Calendar.new # generate ti...
2008 Jul 16
0
Rails 2.1.0 and tzinfo plugin
I am upgrading a Rails 1.2.6 app to Rails 2.1.0 that had used tzinfo gem to manage time zones. Time zone support is built into Rails 2.1.0 and is based on the tzinfo gem. However, it is slightly different (I do not know how slightly) and causes a time based test to fail that passes in Rails 2.0.2 (since it did not have Time Zone support, it uses the tzinfo gem and...
2008 Mar 30
0
[CruiseControl] RubyOnRails build 9153 failed
The build failed. CHANGES ------- New revision 9153 detected Revision 9153 committed by gbuesing on 2008-03-30 23:49:52 TZInfo: Removing unneeded TimezoneProxy class M /trunk/activesupport/CHANGELOG D /trunk/activesupport/lib/active_support/vendor/tzinfo-0.3.8/tzinfo/timezone_proxy.rb M /trunk/activesupport/Rakefile M /trunk/activesupport/lib/active_support/vendor/tzinfo-0.3.8/tzinfo.rb Revision 9152 committed by g...
2006 Nov 28
0
tzinfo_timezone/tzinfo can't modify frozen object
Hi. I get the following error off and on in my app. I''m running latest EdgeRails in development mode, and use the tzinfo_timezone plugin and the tzinfo 0.3.3 gem. I''ve checked line 210 in tzinfo_timezone.rb but cannot relate that to an object modification in tzinfo. Any tips much appreciated. ActionView::TemplateError (can''t modify frozen object) on line #29 of app/views/tickets/my_active_tickets....
2008 Jan 02
1
time_zone_select
Hi, I am using the tzinfo gem and plugins to manage time zone support in my app. In one of the views I have the following select <%= time_zone_select ''user'', ''time_zone'', TZInfo::Timezone.all.sort, :model => TZInfo::Timezone %> This produces a list of all possible countries, do...
2008 May 15
0
Display time in “US-Central” Format Tzinfo
Hi , Is there anyway I can display time in “US-Central” or “US-Eastern” format instead of “ America-New york” or “ Europe-Athens” format at the top of drop down list using Tzinfo . I am presently using “time_zone_select” which displays US zones on top of drop down in “ America-New york” format . <%= time_zone_select (''profile'', ''time_zone'',TZInfo::Timezone.us_zones, :model => TZInfo::Timezone, :default => "America/Chicago&...
2006 Jul 10
0
tzinfo time zones and us states
Hi, I am just starting to work with tzinfo, and I need to figure out how US states map to tzinfo time zones, or in other words what time zone(s) each US state is in. If anybody has already collected this data and would be willing to share it (and thus save me a couple of hours of work) that would be highly appreciated! Thanks! Ingo -...
2009 Mar 31
2
TimeWithZone seems in rails 2.3 seems broken...is this the correct behavior?
...ince it *is* a UTC value? I can get the correct value by extracting the "Time" with no zone, and then recreating a new TimeWithZone. But that can''t be the best way! Loading development environment (Rails 2.3.2) >> Time.zone => #<ActiveSupport::TimeZone:0xb795cbc8 @tzinfo=nil, @utc_offset=0, @name="UTC"> >> event=Event.find(1) => #<Event id: 1, edate: "2009-03-30 12:00:00"> >> event.edate => Mon, 30 Mar 2009 16:00:00 UTC +00:00 >> zutc= ActiveSupport::TimeZone.new(''UTC'') => #<ActiveSuppo...
2010 Apr 16
1
time_zone_select :priority_zones not working properly
...e'', TimeZone.us_zones, :default => "Pacific Time (US & Canada)") When using this code I get "uninitialized constant ActionView::CompiledTemplates::TimeZone". The first thing I noticed was that TimeZone is camel cased. This seems confusing to me considering TZInfo::Timezone is proper cased. I tried using proper cased Timezone and continued to get the same error. Next, I tried using TZInfo::Timezone, this worked. time_zone_select( "user", ''time_zone'', TZInfo::Timezone.us_zones, :default => "Pacific Time (US & Canad...
2006 May 19
1
flickr like DST timezone management
Hello everyone I wonder if anyone can point me to the library for timezone management with DST support, which has timezones, like flickr has. I know that there is TZInfo, but it''s a bit different for it has huge list of available timezones in ''Continent/City'' format. I would like my application to have timezones list more like on flickr (or windows regional settings) - shorter and grouped by cities with same DST conditions. Any experience...