Displaying 20 results from an estimated 10000 matches similar to: "Weird (?) ActiveSupport::TimeZone parse behaviour"
2011 Mar 18
0
Convert Rails TimeZone name to MySQL timezone name?
For various reasons we need to use the CONVERT_TZ() function in mysql to
convert times during queries. The timezone to be used in the conversion
is based on the timezone the user selected when setting up their profile
(from a select box populated with ActiveSupport::TimeZone.us_zone).
The problem is that the zone names in rails differ from the names in
MySQL.
In rails we have a name like
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
2007 Jul 23
0
Request for review of activesupport patches
I''ve got a test suite trifecta going here; all three need review, comments
and (hopefully) approval:
http://dev.rubyonrails.org/ticket/9019
"Fix time_with_datetime_fallback on really old dates"
This is a bug in time_with_datetime_fallback. The test suite currently
fails for me without this patch.
http://dev.rubyonrails.org/ticket/9020
"Fix activesupport time tests"
2008 Jul 30
0
timezone support breaks _before_type_cast method
Some code in my current project validates date time format using
_before_type_cast method. But after adding "config.time_zone = "UTC" in
environment.rb, we can''t get string raw values of some date time columns
using _before_type_cast.
for example,
>> p = Person.new(:name => ''sean'', :birthday => ''1989-01-23'')
>>
2006 Oct 04
0
first_run timezone weirdness
If you''re in a timezone with an abbreviation that map to more than one
timezone (eg, CST), first_run may not work as you expect it to.
Witness:
$ irb -r time
irb(main):001:0> Time.now
=> Wed Oct 04 20:37:24 CST 2006
irb(main):002:0> Time.parse(Time.now.to_s)
=> Thu Oct 05 10:37:30 CST 2006
Notice the 14 extra hours... Time.parse converted the time thinking
CST meant -06:00
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
2005 Apr 19
1
timeSeries Date Warning messages: Set timezone to GMT!
Hello, I must be doing something wrong that's very obvious. But I just
don't see it.
I changed my Windows Time Zone to GMT and my Financial Center to Montreal.
But I still get several warnings.
>Sys.timezone()
[1] "GMT Daylight Time"
>myFinCenter
[1] "Montreal"
>Sys.timeDate()
[1] "Montreal"
[1] [2005-04-19 10:55:02]
Warning messages:
1: Set
2017 Oct 16
0
Another issue with Sys.timezone
>>>>> Stephen Berman <stephen.berman at gmx.net>
>>>>> on Sun, 15 Oct 2017 01:53:12 +0200 writes:
> (I reported the test failure mentioned below to R-help but was advised
> that this list is the right one to address the issue; in the meantime I
> investigated the matter somewhat more closely, including searching
> recent R-devel
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
2008 Jan 11
2
Syslog timezone issue
We recently upgraded (as in, backup, reinstall, selective restore) a
couple of servers from CentOS-3.9 to CentOS-5.1. This generally went
smoothly but we've encountered one confusing problem with syslog.
Under CentOS-3, syslog entries were always dated in the host local
timezone. With CentOS-5.1, they're dated in UTC *most* of the time,
but occasionally in the local timezone. This has
2009 Apr 15
1
uninitialized constant ActiveSupport::Dependencies::Mutex (NameError)
I''m on debian etch w/ ruby1.8, activesupport-2.3.2, getting this on the
first line of code which is require ''active_support'' :
/var/lib/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:55:
uninitialized constant ActiveSupport::Dependencies::Mutex (NameError)
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require''
2012 Jan 23
0
Problem loading modules through ActiveSupport on_load
Working with modules to group certain methods. Currently I have this
set up and it works:
**# app/models/a.rb**
class A
has_history
end
**# lib/history.rb**
module History
module Model
def self.included(base)
base.send :extend, ClassMethods
end
module ClassMethods
def has_history(options = {})
send :include,
2006 Jun 18
2
Hosting timezone differs of clients timezone
Hi,
I have a website in production wich uses a lot of date and time
calculations to show specific information.
The timezone of my hosting service (Dreamhost) is PDT, and the timezone
of my potential clients is CEST. There are 9 hours of difference between
them.
Is there an environment variable that I could adjust in my rails
application, so all date/time values be set to CEST timezone?
Thanks.
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 Dec 08
0
ActiveSupport 2.3.5 and json 1.2.0 gem
Hey,
I''ve tried every trick I can find, yet I''m still unable to get the
json gem and ActiveSupport to play nice.
No matter in which order I load json and active support, I still end
up with: NoMethodError: undefined method `[]'' for
#<JSON::Ext::Generator::State:0x104b7fac0>
I''m trying to use the JSON object directly, *not* as a ActiveSupport backend:
2017 Oct 19
0
Another issue with Sys.timezone
On Wed, 18 Oct 2017 18:09:41 +0200 Martin Maechler <maechler at stat.math.ethz.ch> wrote:
>>>>>> Martin Maechler <maechler at stat.math.ethz.ch>
>>>>>> on Mon, 16 Oct 2017 19:13:31 +0200 writes:
(I also included a reply to part of this response of yours below.)
>>>>>> Stephen Berman <stephen.berman at gmx.net>
2009 Jun 30
0
ri_cal 0.7.0 Released
Subject: [ANN] ri_cal 0.7.0 Released
ri_cal version 0.7.0 has been released!
* <http://ri-cal.rubyforge.org/>
* <by Rick DeNatale>
A new Ruby implementation of RFC2445 iCalendar.
The existing Ruby iCalendar libraries (e.g. icalendar, vpim) provide
for parsing and generating icalendar files,
but do not support important things like enumerating occurrences of
repeating events.
This
2018 May 06
0
Sys.timezone (timedatectl) unnecessarily warns loudly
Dear R-devels,
timedatectl binary used by Sys.timezone does not always work reliably.
If it doesn't the warning is raised, unnecessarily because later on
Sys.timezone gets timezone successfully from /etc/timezone. This
obviously might not be true for different linux OSes, but it solves
the issue for simple dockerized Ubuntu 16.04.
Current behavior R Under development (unstable) (2018-05-04
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'')
=>
2017 Oct 14
0
make check Error: could not get timezone
On Fri, 13 Oct 2017 22:36:48 +0200 Stephen Berman <stephen.berman at gmx.net> wrote:
> I just built the latest R-patched from source (SVN-Revision: 73548, Last
> Changed Date: 2017-10-12) and the build completed without a problem but
> `make check' errored out:
>
> running code in 'reg-tests-1d.R' ...make[3]: *** [Makefile.common:100:
> reg-tests-1d.Rout]