Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

ORA-01874: time zone hour must be between -12 and 14

 
Deb Sadhukhan
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an application which retrieves current time from the system (JVM) and accordingly does some oracle database updates. For testing purpose, I'm using following code to set JVM clock to past date, so that I can test the application without spending much time for setting up the test data every day. But I get the following error when when I try to connect to oracle. Any idea what's going on?

Code for setting JVM time


Error I get when I try to connect to oracle after setting the time.



Thanks
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 35977
422
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Deb,
Can you post the actual JDBC code and query that throws that error?
 
Stevi Deter
Ranch Hand
Posts: 265
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Deb,

Here's a couple links from the Oracle forums that might help:

http://forums.oracle.com/forums/thread.jspa?threadID=395601
http://forums.oracle.com/forums/message.jspa?messageID=1249073#1249073

I included the second because someone in the first thread said that solved the issue, even though it was a different ORA message number.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!