Displaying 11 results from an estimated 11 matches for "timewithzones".
Did you mean:
timewithzone
2009 Jan 23
3
Bug regarding ActiveRecord and TimeWithZone
I''ve discovered a strange behavior regarding ActiveRecord and
TimeWithZone
I''ve seen the error when using SQL Server, I have not yet tried with any
other database.
Here''s output from the console - "User" is a simple model made with a
migration.
-----------------------------------------
>> d1 = User.find(:first).created_at
=> Thu, 21 Jun 2001
2008 Feb 20
2
Rails Edge ActiveSupport::TimeWithZone and Marshalled objects
Hello all,
I''m trying to use the new ActiveSupport::TimeWithZone from Edge. The
problem seems to be that I have a several-action process to create a
Booking. This Booking is stored in the session (session[:booking] =
@booking) throughout the actions until the last action is reached and
the record is saved to the DB.
Using TimeWithZone seems to be producing errors when trying to
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
2008 Jul 02
0
before_type_case broken?
...I get a TimeWithZone
instead of a String:
model.start_date = "2001/01/02"
model.start_date.class = ActiveSupport::TimeWithZone
model.start_date_before_type_cast.class = ActiveSupport::TimeWithZone
Examining the @attributes in AR/lib/attribute_method.rb shows that the
entries are already TimeWithZones, whereas in 2.0 they are Strings.
Has anyone else come across this?
tahnks,
d
--
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...
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
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'')
>>
2011 Apr 25
1
Postgres Timestamp Fields Displayed with Time format
I have Time fields in my PostgreSQL tables, which I force to display
as time only with this entry in config/locales/en.yml:
time:
formats:
default: "%H:%M:%S"
Problem is, that format is now applied to Timestamp fields, including
the default created_at and updated_at fields.
Why is it applying the Time (time only) format to a Timestamp (date +
time) field, and how do I
2010 Jul 08
3
Testing equality
Hello
How can I test equality with two objects when they include some
attribute that is BigDecimal?
if I make something like this:
it "should ...whatever" do
obj = Factory.create(:my_object)
...
MyObject.first.should == obj
end.
FAILS
This fails because the object expected is different from the object
gotten, and the only difference are the BigDecimal attributes, that are
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
2009 Sep 21
4
Announcement: Foreman 0.1-1 is out
Hello All,
I''m happy to announce the next stable release of Foreman, main new features
include:
- Integration of Puppet Reports, once enabled you would see a real time
overview of all of yours hosts status.
- Improved support for multiple Puppet Masters (e.g. import facts and
reports from remote serves over http)
- Simplified migration from existing external nodes setup,
2012 Jun 21
6
where do I report this DateTime bug?
I have isolated what appears to be a bug in the Rails extensions to
DateTime, but I don''t know where to report it.
I have a standalone file to demonstrate the bug, but the punch line is
that this code:
TestRecord.create!(:f_datetime => (expected = DateTime.jd(2000000)))
found = TestRecord.first.f_datetime
puts("expected == found => #{expected == found}")