similar to: TimeZone, TZInfo, daylight savings, and composed_of

Displaying 20 results from an estimated 1000 matches similar to: "TimeZone, TZInfo, daylight savings, and composed_of"

2007 Apr 03
1
Some timezone trouble involving tzinfo and postgresql
Friends, So there I was, minding my own business, trying to make my rails app timezone aware (DST, as well), since it''s all 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
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
2006 Jan 30
1
Introduction & time_zone_select with mapped TimeZone question
I''m new to this list, I''m a student in History, Computerscience and a bit of Philosophy from the Netherlands... I have started using rails a few weeks ago, I did read the Agile Webdevelopment with Rails book, and I generally started to love Rails for it''s sheer beauty and intelligent structure... However I came across something that puzzles me quite a bit. It''s
2008 Sep 22
8
TimeZone daylight savings time problems
Here is the following from my console: >> Time.now => Mon Sep 22 11:33:34 +0200 2008 >> Time.now.utc_offset => 7200 >> TimeZone[Time.now.utc_offset] => #<TimeZone:0x11aea90 @tzinfo=nil, @utc_offset=7200, @name="Athens"> >> Time.now.in_time_zone(TimeZone[Time.now.utc_offset]) => Mon, 22 Sep 2008 12:34:22 EEST +03:00 (I am in Spain - CET - and
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]"> <%=
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''] =
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'',
2009 Mar 31
2
TimeWithZone seems in rails 2.3 seems broken...is this the correct behavior?
My environment.rb contains config.time_zone = ''UTC'' If my understanding is correct, rails should assume time values coming from the database are UTC, and since config.time_zone is set to ''UTC'', it should not try to convert the times. Instead, rails is assuming that the db values are Eastern (my local zone) and is incorrectly adding four hours to convert to
2010 Apr 16
1
time_zone_select :priority_zones not working properly
I sent this earlier but I don''t think it ever came through. Sorry if this is a reposting. When using :priority_zones for time_zone_select in a manner described by the API docs for ActionView::Helpers::FormOptionsHelper I''m getting errors. Here is an API docs example: time_zone_select( "user", ''time_zone'', TimeZone.us_zones, :default =>
2006 Mar 19
4
Trouble with composed_of
I''m trying to use composed_of within my model. I have a field in my database named ''card1'', which is simply a string. I have this in my model class Player < ActiveRecord::Base composed_of :card1, :class_name => ''Card'' end class Card attr_reader :value, :suit def initialize(s) @value = s[0].chr @suit = s[1].chr end end The
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, does anyone know of a way to only display the UTC + / - options and not the
2005 Dec 17
1
How to use validation with aggregation (composed_of)?
At the risk of being banned for posting the same question twice, I thought I''d try once more with a question for the title rather than a statement (on the basis that perhaps questions get answered and statements ignored ;-) ) ActiveRecord supports composed_of for value objects which is fantastic but one thing that it doesn''t seem to support (or at least I am unable to
2006 Jul 13
1
Incorrect composed_of I think
I am trying to use composed_of in my model, but I not succeeding. With the code I pasted below, I cannot perform this action in the console: property = Property.new(1, "px") I get NameError: uninitialized constant Property when I try to perform that action. It''s not finding my class I made I suppose. The Property class is in the same file as the Element class, element.rb.
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::Timezone.get(''America/Anchorage'') =>
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
2009 Mar 20
1
Getting a Time Zone abbreviation from the full name?
There''s got to be an easier way... I am building an event manager and as part of it, the user selects the time zone of the event from a drop-down list using the time_zone_select helper. This is stored in the events table as a string. Because of legacy data which is stored in UTC, I want to keep the dates and times in the table as UTC but when I display it, I want to show the abbreviated
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
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 =
2008 Jan 24
2
Meridian case
Hi there, I have a *really* weird issue with rspec on rails: Given a time meridian formatted using %p When I run `rake spec` the time meridian is converted to lower case: expected: "Today 08:00 PM", got: "Today 08:00 pm" Yet when I run `rake spec:models` and `spec -cfs app/models` the specs pass, ie the the time meridian is in upper case. Anyone got any ideas how I
2010 Apr 07
2
rails timezone difference in console and production application
Hi all, I''m on a rails 2.3.5 app. I''ve got my timezone set to ''Brussels''; config.time_zone = ''Brussels'' When I use mysql I see that a date is stored in UTC (as expected); e.g. 2010-04-07 15:03:10 When I use console to print out the date it correctly returns; >> job.created_at.strftime(''%d %b %Y, %H:%M'') =>