The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
ActiveRecord + sqlserver: At last dates before 1970 and after 2038

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Jon Egil Strand

Posts: 24
Nickname: jonegil
Registered: Mar, 2006

Jon Egil Strand drives change in Mercer.
ActiveRecord + sqlserver: At last dates before 1970 and after 2038 Posted: Jul 26, 2006 6:57 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Jon Egil Strand.
Original Post: ActiveRecord + sqlserver: At last dates before 1970 and after 2038
Feed Title: Jon Egil Strand
Feed URL: http://www.luretanker.no/blog/feed/rss2/?cat=1
Feed Description: Weblog for my professional side
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Jon Egil Strand
Latest Posts From Jon Egil Strand

Advertisement
There is / has been an issue with ActiveRecords handling of dates from Microsoft SQL-server. Dates before 1970 and after 2038 have caused very nasty errors class Person < ActiveRecord::Base set_primary_key "personnummer" end p1 = Person.find("01028700000") p2 = Person.find("01013400000") # True employee_date for p1 is 2005-07-08 # True employee_date for p2 is 1968-04-17 puts p1.employee_date =>Fri Jul 08 00:00:00 W.Europe Daylight Time 2005 puts p2.employee_date =>Sat [...]

Read: ActiveRecord + sqlserver: At last dates before 1970 and after 2038

Topic: Interesting Answers from Great Programmers Previous Topic   Next Topic Topic: RubyConf 2006 Final Presentation Selection

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use