Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Solaris Date  RSS feed

 
Manoj Raghuwanshi
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I am facing a strange problem
I am running a java program on Solaris box. Then I am storing the current time in the database.(new Date()) The date that I got after executing date command is �

Thu Nov 29 06:43:52 GMT 2007

But the value getting stored in database is �

2007-11-29 20:18:35.303

Please anybody tell me Why there is so much difference?
Thanks
Manoj
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16028
87
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most likely because Solaris is set to a different timezone than what the database is using. Note that the first date you are showing is in GMT. What timezone is the database using?
 
Manoj Raghuwanshi
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
database is in PST
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!