• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java converting unix time to date different on each computer,why?

 
Meir Yan
Ranch Hand
Posts: 599
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have weird situation i have simple code that looks like this :



some computers im getting : 21.06.2011 15:43 and this is the date that im expecting to get and its fine .
but on other pc's im getting :21.06.2011,18:43 i dont know why im getting this date. what can be wrong in the pc or java configuration that gives me this ?
 
fred rosenberger
lowercase baba
Bartender
Posts: 12186
34
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My guess would be something with time zone setting, but i couldn't tell you where to look specifically.
 
James Sabre
Ranch Hand
Posts: 781
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The computers have been configured with different time ones. Make all the time zones the same or specify the time zone for your SimpleDateFormat.
 
Nick Jariwala
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Use this format and you'll see the timezone in the output.

-Nick
http://www.the-tech-talent.com
 
Meir Yan
Ranch Hand
Posts: 599
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well strange thing is happening , in some pc's it fixed the problem and in some it doesn't do any change .
they all set into same timezone .
what else can it be ?
 
James Sabre
Ranch Hand
Posts: 781
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Meir Yan wrote:well strange thing is happening , in some pc's it fixed the problem and in some it doesn't do any change .
they all set into same timezone .
what else can it be ?


Since you don't say how far out the rogue PCs are then I can only suggest a long shot - daylight saving time?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic