Displaying 16 results from an estimated 16 matches for "time_zone_select".
2006 Jan 30
1
Introduction & time_zone_select with mapped TimeZone question
...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 how to
add a time_zone_select form field using a composed_of class with mapped
utc_offset and name fields...
In my form I have:
<%= time_zone_select(''user'',''time_zone'') %>
In my user-class I have:
composed_of :time_zone, :class_name => ''TimeZone'', :mapping =>...
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 =>
"Pacific Time (US & Canada)")
When usi...
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 th...
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 user with an optional
timezone, becomes quite a challenge.
That''s why I created this patch:
http://dev.rubyonrails.or...
2006 Aug 31
0
time_zone_select Acting Funky
I am using time_zone_select for the first time:
<%= time_zone_select(''user'', ''default_timezone'') %>
I have an instance variable called user and that model has an attribute
called ''default_timezone''.
The list displays and when I submit the form, I see it sends the...
2006 Sep 01
0
time_zone_select Doesn't Update in Save
I am using time_zone_select for the first time:
<%= form.time_zone_select(''default_timezone'') %>
I have an instance variable called user and that model has an attribute
called ''default_timezone''. This is all inside a nice form_form construct.
The list of time zones displays and whe...
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 named places?
thanks
--
Posted via http://www.ruby-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...
2005 Oct 19
1
TZInfo::Timezone problem selected value
...quot;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 from TZInfo
this list is sorted, but the value isnt selected
<%= time_zone_select ''user'', ''time_zone'', TZInfo::Timezone.all.sort, :model
=> TZInfo::Timezone, :selected => @firm.gmt_zone %>
anyone any solutions?
thanks
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" )%>
I can display US zones in “...
2007 Apr 03
1
Some timezone trouble involving tzinfo and postgresql
...what I mean:
We want to be able to access the user''s timezone attribute as a
TZInfo::Timezone object instance so that we can say things like:
@current_user.tz.utc_to_local(some_date_time_object)
But whenever I used the standard aggregation shown in examples on this
topic, the drop down time_zone_select for TZInfo doesn''t recognize the
user''s previous selection! So I got around that like thus:
i. created a string field on the user model called time_zone
ii. added an accessor tz that will give us the object support
def tz
TZInfo::Timezone.get(self.time_zone)
end
iii. a...
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 possib...
2011 Nov 11
1
time zone not getting saved in the database
...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 form(haml)
f.time_zone_select :time_zone, ActiveSupport::TimeZone.all.sort
IN Environment.rb
config.time_zone = ''UTC''
IN User table added time_zone as string column
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, se...
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 version of the time zone value as selected.
For example, if the user created an event...
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) -
2005 Dec 09
0
Time zone select
Quick question
I have can easily create a nice time zone select with
<%= time_zone_select("account", "time_zone", TimeZone.us_zones ) %>
How can I select the default time zone that I want?
Thanks,
Zack