#1460 new

do-postgres timestamp conversion error

Reported by psanford | December 17th, 2010 @ 10:21 AM

Converting timestamptz columns to Time objects will occasionally result in the Time object being shifted 2048 minutes into the past.

The do_postgres.c parse_time function assumes that the timestamp will always have 6 digits of sub-second precision. We have timestamptz records with both 6 and 5 digits of precision. The records with 5 digits get parsed incorrectly and the resulting ruby Time object is 2048 minutes behind what is stored in the database.

The attached patch fixes this behavior.

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket