Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization 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
Marshal
Posts: 34095
337
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic