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

new Time(3600000) = 02:00:00  RSS feed

 
Oczek Oczkowy
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i'm a little confused with time in java. everyone know that 3600000 milisecond = 01:00:00 (1h) so what is going on with this: new java.sql.Time(3600000) = 02:00:00 ?
does anybody can help?
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Time(long) constructor interprets the milliseconds relative to GMT. My guess would be that you're one hour ahead of GMT, so 1 o'clock GMT = 2 o'clock your time.

(Actually, I looked at the IP address you posted from, and that indicates that you are, in fact, one hour ahead of GMT )
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!