search for: timewithzone

Displaying 11 results from an estimated 11 matches for "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...
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 erro...
2009 Mar 31
2
TimeWithZone seems in rails 2.3 seems broken...is this the correct behavior?
...C time. The output from script/console is below. (results are identical to using a browser) What else do I need to do to convince rails to leave the time value alone, since it *is* a UTC value? I can get the correct value by extracting the "Time" with no zone, and then recreating a new TimeWithZone. But that can''t be the best way! Loading development environment (Rails 2.3.2) >> Time.zone => #<ActiveSupport::TimeZone:0xb795cbc8 @tzinfo=nil, @utc_offset=0, @name="UTC"> >> event=Event.find(1) => #<Event id: 1, edate: "2009-03-30 12:00:00&qu...
2008 Jul 02
0
before_type_case broken?
Hey, I''ve noticed that I seem unable to get a _before_type_cast value for dates in 2.1. Specifically, if I assign a date string to a date attribute, and then call attribute_before_type_cast 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, where...
2009 Jun 30
0
ri_cal 0.7.0 Released
...://rick_denatale.lighthouseapp.com/projects/30941/tickets/6 Type of dtstart and dtend (DATE or DATETIME) now preserved on enumeration ### 0.0.8 * Fixed http://rick_denatale.lighthouseapp.com/projects/30941-ri_cal/tickets/1 EXDATE and RDATE now pick up the timezone from DateTime, Time, and TimeWithZone values * Fixed http://rick_denatale.lighthouseapp.com/projects/30941/tickets/2 Missing arithmetic methods in PropertyValue::Date * Fixed http://rick_denatale.lighthouseapp.com/projects/30941/tickets/3 Components with no recurrence rules or rdate properties failed on enumeration, they...
2008 Jul 30
0
timezone support breaks _before_type_cast method
...lumns using _before_type_cast. for example, >> p = Person.new(:name => ''sean'', :birthday => ''1989-01-23'') >> p.birthday_before_type_cast >> Mon, 23 Jan 1989 00:00:00 UTC 00:00 >> p.birthday_before_type_cast.class => ActiveSupport::TimeWithZone now birthday_before_type_cast returns value of type: "ActiveSupport::TimeWithZone". Is there a method to get the raw value of date time column in this case? By the way, is this a bug of rails 2.1.0 or the right behavior? Thanks. -- Posted via http://www.ruby-forum.com/. --~--~-------...
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}")