similar to: Time zone select

Displaying 20 results from an estimated 6000 matches similar to: "Time zone select"

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 =>
2010 Apr 15
0
[Rails v3] time_zone_select :priority_zones not working properly
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 => "Pacific Time (US & Canada)") When using this code I get "uninitialized constant
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'',
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
2011 Nov 11
1
time zone not getting saved in the database
Hello, Using rails 2.3.9 and ruby 1.8.7 I am trying add time zone in the site according to user''s time zone (selected by the user from the drop down of time zones)Code is done as follows, but time zone is not getting saved in the database. IN Application Controller before_filter :set_time_zone def set_time_zone Time.zone = current_user.time_zone if current_user end IN View
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 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
2006 Mar 16
5
TimeZone, TZInfo, daylight savings, and composed_of
Does anyone know the best way to track time zone information. There doesn''t seem to be much documentation on this. So far it seems like a simple db field like create table accounts ( id int 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 ...
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]"> <%=
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
2006 Jul 04
0
Time zone (select and offset)
How to use ''time_zone_select'' and get the returned value as offset, not a string. 0 instead of ''London'', 1 instead of Brussels, and -1 instead of azores. I have tried using my own hash with ''select''. But hashes are not sorted so the output is a mess. If it''s not possible to get offset for ''time_zone_select'', is
2010 Feb 26
1
why doesn't "config.time_zone = 'location'" ensure Time.now gives the time back in this time zone???
Hi, I''m after a way of ensuring all my Time work (e.g. using Time.now) uses the time zone I define as default. To do this I''ve set the following line in config/environment.rb: config.time_zone = ''Brisbane'' But even after this, if I open up "./script/console" I note that Time.now doesn''t work. That is I see: ?> Time.now => Thu
2007 Dec 21
1
time_zone_select helper enhancement
As we all know it, Time Zones are a pain in the neck. Rails make things easier by providing some nice helpers. However, I recently faced a challenge when trying to pre select a time zone for a user. Using the time_zone_select helper, there''s simply no way you can pre select a timezone for a user unless you already saved the time zone in his/her record. Creating a new user or editing a
2006 Jul 17
0
Weird problem with TimeZone::adjust and TimeZone::unadjust. Please help.
I''m not sure I''m understanding this correctly. I have a user model that is for all of my user accounts. Each user account has a time zone. I added this line to automatically create a TimeZone object for that user using their timezone: composed_of :tz, :class_name => ''TimeZone'', :mapping => %w(time_zone name) I also changed my environment.rb to
2011 Jul 20
1
Time.zone is nil creating problems
Hello guys, I am using ruby 1.9.2-p290 and rails 2.3.11 and when i am trying to run Time.zone in my console it is showing me nil and when i am trying to mention it in the environment.rb file by config.time_zone = ''UTC'' it is showing me an error .rvm/gems/ruby-1.9.2-p290/gems/rails-2.3.11/lib/initializer.rb:561:in `initialize_time_zone'': Value assigned to
2007 Jan 23
2
SslRequirements plugin and mocha
Hi. I''m loving mocha but have ran into a problem with using the mocha plugin with a project that has the SslRequirement plugin. It seems there is some conflict between the two? Any ideas? $ ruby test/functional/calendar_controller_test.rb /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:478:in `const_missing'': uninitialized constant
2007 Jan 24
1
Timezone abbreviation question
Is it possible to get timezone abbreviations using the TimeZone or TzinfoTimezone classes? Even after converting UTC to localtime it still reports the timezone abbreviation as UTC. Example: >> @tz = TzinfoTimezone.us_zones[2] => #<TzinfoTimezone:0x30868a0 @utc_offset=-28800, @name="Pacific Time (US & Canada)"> >> @tz.now => Wed Jan 24 12:36:56 UTC 2007
2006 Apr 27
0
Intergration testing with ordered fixtures
Hi all. I have a question on accessing fixtures by name. I''m doing integration testing very similar to what is described in Jamis''s excellent writeup at http://jamis.jamisbuck.org/articles/2006/03/09/integration-testing-in-rails-1-1. The problem is that I am using ordered yml fixtures so that rake loads each element in the correct sequence. I need to do this because my
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