• Post Reply Bookmark Topic Watch Topic
  • New Topic

System.currentTimeMillis()  RSS feed

 
Akin Demir
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Does System.currentTimeMillis() method give CET time or local time
 
Steve Morrow
Ranch Hand
Posts: 657
Clojure Spring VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Akin Demir:
Hi all,

Does System.currentTimeMillis() method give CET time or local time


It's an extremely important skill to learn to read the API and become familiar with the tools you will use to program Java. Java has an extensive set of documentation that you can even download for your convenience. These "javadocs" are indexed and categorized so you can quickly look up any class or method. Take the time to consult this resource whenever you have a question - you'll find they typically contain very detailed descriptions and possibly some code examples.

Java� API Specifications
Java� 1.5 JDK Javadocs
 
Akin Demir
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What i meant was

Consider a time zone +2 and -4
will this method give the same long if there are exactly 6 hours of time difference
 
Steve Morrow
Ranch Hand
Posts: 657
Clojure Spring VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Consider a time zone +2 and -4
will this method give the same long if there are exactly 6 hours of time difference
I'm not trying to be terribly obtuse, but you can easily test this by comparing the results of currentTimeMillis() with the results of the same method after setting your system clock ahead six hours.

System.currentTimeMillis() is dependent on the system clock.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What Steve meant was that you can easily look it up yourself. For a simple question about how an API method works, using the API documentation is going to be a lot faster than asking people on a forum like this.
 
Steve Morrow
Ranch Hand
Posts: 657
Clojure Spring VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What Steve meant...
Thanks; I try to keep my tone "less direct" here, in line with the friendly atmosphere (some of the other forums are a bit more on the "blunt" side). I appreciate the clarification.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!