Displaying 20 results from an estimated 500 matches similar to: "Introduction & time_zone_select with mapped TimeZone question"
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 =>
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
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
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
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
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
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
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]">
<%=
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 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
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'',
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 data:
Parameters:
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 when I submit the form, I see it sends
the data:
Parameters:
2010 Jun 14
2
How to disable day light saving on Snom 360 phones?
Greetings,
Sounds like a simple thing to do, but I was not able to do it on these
particular phones. Snom wiki was not helpful. My client wants to keep his
phones pointed to UTC time, no DST, no change in timezone, i.e. to stay at 0
hours difference.
The phones are provisioned from a tftp server.
If I remove 'dst' value from the provisioning file, on bootup phones force
users to pickup
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
...
2009 Jul 21
1
Problem with INTERNALDATE when the year in localtime and GMT different
In my thought utc_offset function in src/lib/utc-offset.c returns wrong
offset value when the year in localtime and GMT different.
/* max offset of 24 hours */
if (ltm.tm_yday < gtm.tm_yday)
offset = -24 * 60;
else if (ltm.tm_yday > gtm.tm_yday)
offset = 24 * 60;
else
offset = 0;
I think this code should be modified as followings.
/* max offset of 24 hours */
if ((ltm.tm_year ==
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
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
2006 Mar 15
7
rails on OS X 10.3.9 not working
Hello,
I''ve installed Ruby 1.8.4 via Darwinports, installed gem 0.8.11 too and
then installed Rails via gem. I''m using OS X 10.3.9.
When I now type rails in the terminal, the following lines appear:
# rails
/opt/local/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/
active_support/values/time_zone.rb:12: undefined method `attr_reamer''
for TimeZone:Class