taps icon indicating copy to clipboard operation
taps copied to clipboard

Taps Server Error: PGError: ERROR: time zone displacement out of range: "2011-11-15 12:00:00.000000+5894114400"

Open pupeno opened this issue 14 years ago • 60 comments

I run the following command to push the contents of my local database to Heroku:

heroku db:push --app my-app

which uses taps and from my home computer it works flawlessly but from my work computer I get this error:

Taps Server Error: PGError: ERROR: time zone displacement out of range: "2011-11-15 12:00:00.000000+5894114400"

I'm not sure where that date is coming from, I can't find it in the data anywhere. Any ideas what's going on and/or how to fix it?

Thanks.

pupeno avatar Nov 16 '11 16:11 pupeno

This seems to happen with Ruby 1.9.3-p0 but not with 1.9.2.

pupeno avatar Nov 17 '11 10:11 pupeno

Posted on sequel.

https://github.com/jeremyevans/sequel/issues/405

kenips avatar Dec 01 '11 17:12 kenips

Same problem here. Ruby v1.9.3

mdi avatar Dec 23 '11 21:12 mdi

This is a problem due to remote ruby version mismatching. Just use 1.9.2 until heroku updates to 1.9.3.

kenips avatar Dec 24 '11 06:12 kenips

I can confirm that switching to 1.9.2 locally fixed the issue in my situation.

jrhorn424 avatar Mar 12 '12 04:03 jrhorn424

This is a duplicate of Issue #92. I suggest closing it.

jrhorn424 avatar Mar 12 '12 04:03 jrhorn424

Yes, like jhorn424, i switched back from 1.9.3 to 1.9.2 locally, and the error disappeared

jesperronn avatar Apr 03 '12 19:04 jesperronn

rvm use ruby-1.9.2-p290

heroku db:push

Taps Server Error: PGError: ERROR: time zone displacement out of range: "2012-04-24 12:00:00.000000+5894500800"

Any ideas?

ghost avatar Apr 25 '12 15:04 ghost

$ rvm install ruby-1.9.2-p318 $ rvm use ruby-1.9.2-p318 $ heroku db:push Resetting sequences

dongri avatar May 09 '12 01:05 dongri

I had the same problem.. the rvm directions from dongriab fixed it.. just after the rvm use cmd you need to put your gems on since its a new ruby install.. sudo gem install heroku --no-ri --no-rdoc sudo gem install taps --no-ri --no-rdoc sudo gem install sqlite3 --no-ri --no-rdoc Then it worked..fa

cuzic4n avatar May 11 '12 05:05 cuzic4n

FYI, I tried setting the Heroku ruby version according to this article: http://blog.heroku.com/archives/2012/5/9/multiple_ruby_version_support_on_heroku/ . I confirmed that it worked to set the ruby version. But I'm still getting this error from taps.

ivanoats avatar May 17 '12 16:05 ivanoats

Thanks! resetting my Ruby version to 1.9.2 worked for me :)

rebekah avatar May 18 '12 19:05 rebekah

Just thought I would note this since I got stuck on this. If you are on Mac OSX Lion and get stuck with errors trying to install Ruby 1.9.2 because of the updated Xcode compiler add this to the end of your version install. rvm install ruby-1.9.2-p318 --with-gcc=clang

creativereason avatar May 31 '12 15:05 creativereason

Donwgrading ruby to version 1.9.2-p318 worked for me as well :)

kupkovski avatar Jun 06 '12 20:06 kupkovski

Both heroku and my local development envionment are using ruby 1.9.3p194. Still getting this issue.

hale avatar Jun 19 '12 23:06 hale

Downgrading to ruby 1.9.2-p320 locally fixed it.

hale avatar Jun 20 '12 00:06 hale

This is a horrible solution to this problem. Has any other progress been made on this?

whalesalad avatar Jul 23 '12 14:07 whalesalad

if you use bundler beta you cab specify the ruby version in the gemfile, thereby forcing heroku to use whichever ruby version you like (also guarantees local and heroku have same ruby)

hale avatar Jul 23 '12 14:07 hale

bundler version you want is '1.2.0.rc'. Its a git tag so just add github url to bundler's entry in the gemfile.

hale avatar Jul 23 '12 15:07 hale

I also had this issue. Using bundler 1.2.0.rc with the ruby '1.9.3' directive didn't solve it. I checked and both remote and local Ruby were 1.9.3-p194.

I was able to work around the issue by installing ruby 1.9.2:

$ rbenv install 1.9.2-p318
$ rbenv local 1.9.2-p318
$ gem install heroku
$ gem install sqlite3
$ gem install taps
$ heroku db:push

joshhepworth avatar Jul 31 '12 23:07 joshhepworth

You probably haven't setup the PATH correctly, just look at the guide @lohsu mentioned. To verify, run heroku run "ruby -v" and make sure that you have the matching ruby version.

This is a non taps issue and should be closed.

kenips avatar Aug 05 '12 16:08 kenips

Same as hale, I am running 1.9.3p194 both locally and on heroku

Only difference is heroku lists it as 1.9.3p194 and locally with rvm its listed as ruby-1.9.3-p194 I don't think that would matter though.

It fails, but just switching locally back to 1.9.2 and leaving heroku on 1.9.3 and it works.

jisaacks avatar Aug 11 '12 00:08 jisaacks

Still an issue with 1.9.3p194 even after heroku added support for ruby version in the gem file.

thephw avatar Sep 10 '12 16:09 thephw

Worked for me downgrading my ruby to 1.9.2, reinstalling heroku and taps gems and forcing ruby on Gemfile to 1.9.2 (to use with heroku).

jnettome avatar Sep 11 '12 02:09 jnettome

I'd like to see this issue solved, running ruby 1.9.3p194 both on Heroku and locally.

ronangimenes avatar Sep 18 '12 14:09 ronangimenes

Downgrading worked for me also.

rvm use 1.9.2 # => ruby-1.9.2-p290 heroku db:push

DruRly avatar Sep 19 '12 10:09 DruRly

I've also experienced this issue and upgrading / downgrading both local and heroku ruby versions (1.9.2 and 1.9.3) did not solve the problem.

Looking at the original error message:

Taps Server Error: PGError: ERROR: time zone displacement out of range:

"2012-10-09 12:00:00.000000+5894904000"

It seems obvious that something is actually wrong with the way dates are getting converted during the process.

The actual value of the date field in my case was: "2012-10-09 02:35:34"

What part of the process is causing this change to happen?

cameronhickey avatar Oct 09 '12 02:10 cameronhickey

It wasn't working for me even when I downgraded to 1.9.2. I had to install the heroku gem (I only had the toolbelt installed) and then heroku db:push worked with 1.9.2.

seanbehan avatar Oct 28 '12 04:10 seanbehan

Note that this happens with 1.9.2p320 as well.

mdarby avatar Nov 05 '12 22:11 mdarby

It worked when I went from 1.9.3 to ruby 1.9.2p320.

antoniorosado avatar Nov 08 '12 21:11 antoniorosado