Displaying 20 results from an estimated 70000 matches similar to: "Detect client time_zone"
why doesn't "config.time_zone = 'location'" ensure Time.now gives the time back in this time zone???
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
2008 Jul 21
6
form_for and select ( => f.select)
Hi All
I''m trying to combine the from_for and select helpers
Right now I have
form_for :service, :url => ...... do |f|
select("abc", "xyz_id", @my_arr.collect {|item| [ item, "bla" ] },
{:prompt => "opt1"} )
....
end
What I want to do is something like
....
f.select("abc", "xyz_id", @my_arr.collect {|item|
2009 Mar 11
1
Is this a documentation bug? Spss dates import
Hello R-user
bug seekers are needed!
In order to perform these simple tasks you have to use a copy of SPSS
and obviously R.
The problem is that date conversion of data coming from SPSS
gives wrong results, if we follow ?as.POSIXct
## SPSS dates (R-help 2006-02-17)
z <- c(10485849600, 10477641600, 10561104000, 10562745600)
as.Date(as.POSIXct(z, origin="1582-10-14",
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
2009 Mar 10
1
?as.POSIXct (PR#13587)
Full_Name: Luca Braglia
Version: 2.8
OS: Windows
Submission from: (NULL) (85.18.136.110)
>From ?as.POSIXct
## SPSS dates (R-help 2006-02-17)
z <- c(10485849600, 10477641600, 10561104000, 10562745600)
as.Date(as.POSIXct(z, origin="1582-10-14", tz="GMT"))
^^
It should be 15 (Gregorian calendar adoption day, when
2008 Jun 30
1
rake aborted! undefined method `time_zone=' for #
Dear
I have uploaded one project on my account on one of the servers. When
I do migrate
the database rake db:migrate
i get this error
rake aborted! undefined method `time_zone='' for #
any idea on how to solve this problem
Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2009 Feb 10
1
config.default_timezone vs. config.time_zone
In config/environment.rb are these statements equivalent?
config.default_timezone = :utc
config.time_zone = "UTC"
If not, then how do they differ in effect?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this
2012 Jun 26
0
Value assigned to config.time_zone not recognized
Hi,
I''m trying to run Puppet on a RHEL 6 box using apache through passenger. I
recently added the Inventory service, but I''m now getting the following
error:
Value assigned to config.time_zone not recognized.Run "rake -D time" for a
list of tasks for finding appropriate time zone names.
I''m not seeing any tell-tell logs from /var/log/httpd/* or
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
2024 Sep 24
2
Question about Date Object and time zones
Hello,
I have a question regarding the date objects and timezones. My current
understanding is, that a Date object does only save the days from the
origin and no more information about timezones or other information
(please correct me if I am wrong).
But if I use
d = as.Date("2024-11-11")
or
d = as.Date("2024-11-11", tz="America/New_York")
the date object is
2008 Jul 28
0
Re: remote_ip always returns 127.0.0.1 (apache)
On Mon, Jul 28, 2008 at 3:09 PM, Luca Scaljery
<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:
> I have my webrick server behind apache (all on the same server). The
> problem I have now is that request.remote_ip always returns 127.0.0.1.
> So it gets this IP from apache (I guess). How do I get the true client
> IP address
request.env[
2024 May 28
1
add only the 1st of May with POSIXct
?s 16:23 de 28/05/2024, Stefano Sofia escreveu:
> Dear R-list users,
>
> From an initial and a final date I create a sequence of days using POSIXct.
>
> If this interval covers all or only in part the months from May to October, I need to get rid of the days from the 2nd of May to the 31st of October:
>
>
> a <- as.POSIXct("2002-11-01", format =
2006 Dec 10
2
set specific date with date_select
Hi All
I seem to have a problem with date_select methods. I cannot set a
default date. I tried the following:
<%= date_select( "post", "written_on", :selected => Date.new(2005,3,31),
:order => [:day, :month, :year] ) %>
But still I get todays date :(
Any suggestions what I do wrong here ?
Thnx a lot
LuCa
--
Posted via http://www.ruby-forum.com/.
2024 May 29
1
add only the 1st of May with POSIXct
Thank you Rui for your code.
I basically understood all your suggestions.
I am using an old version of R (version 3.6.3, installed in a server I am not allowed to control), and the new pipe operator does not work.
I tried to run your code without the "|>" operator, but I get an error when I use apply.
Could you please expand your code without the pipe operator?
Thank you again
2008 Apr 01
12
undefined method `time_zone=' on Rails 2.0.2.9129 on Mac OS X
I just did a gem update and it broke my rails application. I had to
go back to 2.0.2, because 2.0.2.9129 produces this error on Mac OS X
Leopard:
/Users/nicholas/RubyDev/dummy/config/environment.rb:38: undefined
method `time_zone='' for #<Rails::Configuration:0x12c9f24>
(NoMethodError)
from /Library/Ruby/Gems/1.8/gems/rails-2.0.2/lib/initializer.rb:47:in
`run''
from
2024 May 29
1
add only the 1st of May with POSIXct
On Tue, 28 May 2024, Stefano Sofia writes:
> Dear R-list users,
>
> From an initial and a final date I create a sequence of days using POSIXct.
>
> If this interval covers all or only in part the months from May to October, I need to get rid of the days from the 2nd of May to the 31st of October:
>
>
> a <- as.POSIXct("2002-11-01", format =
2003 Aug 04
0
as.POSIXct Bug when used with POSIXlt arg and tz= arg (PR#3646)
Tracking down this bug was joint work with Jermoe Asselin (jerome at
hivnet.ubc.ca) and Patrick Connolly (p.connolly at hortresearch.co.nz). We
collectively were able to determine that this is a problem in both Windows 2000
and in Linux and by testing it in our three time zones that it seems to be
daylight savings time related.
Conversion of POSIXlt datetimes to POSIXct appears to have problems.
2012 Oct 08
1
migrating from Centos 5.8 -> 6.3 LDAP Client Config
Hi,
I run a Centos 5.8 samba server which uses a separate LDAP centos 6.3
server for user and group authentication.
Now we migrate to a new centos 6.3 samba server and I'd like to know how
do 'ldapify' that new server the best way.
I'm a bit confused if I can use the same nss setup like on the current
old server or how and what to configure to go with SSSD?
May be someone can
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
2009 Jul 28
1
Rails date conversion
The environment.rb file in a Rails 2.3.2 app says:
> Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
Auto-convert to this zone... when?
Also, what are the differences between these two statements?
config.time_zone = xxx
config.active_record.default_timezone = xxx
I ask these questions because I have a scenario whereby an AR-backed
object, when