-5

I have question about the current system time. I have software based on command line. When I run that software, it shows me the time at both the start and end of execution. ie

  • Start: The current system time is: 1378258559
  • End: The current system time is : 1378258570

I do not know if the time is in seconds or minutes. How is the 1378258559 is calculated? The difference between the two numbers is 11.

FYI, the current date and time on my system is: 04/09/2013 9:50 AM

Leigh
  • 28,765
  • 10
  • 55
  • 103
wael
  • 1
  • 1
  • 2
  • 2
    Try reading api for System.currentTimeinMillis() and see what the api says. I do not have right, otherwise i would have vote down for you.....Try reading first and then ask question. – H-Patel Sep 04 '13 at 01:55
  • 4
    Zero research effort. –  Sep 04 '13 at 02:00
  • Many thanks for you but the System.currentTimeinMillis() return 13 digit not 10 digit as i have saw in my system – wael Sep 04 '13 at 02:06
  • Actually it is neither 10 nor 13 digits, it is 64 *bits.* You need to read the Javadoc. – user207421 Sep 04 '13 at 02:15

1 Answers1

2

This website has a calculator:

It is the number of seconds since January 1st, 1970 at midnight GMT.

The 11, is because something took 11 seconds.

Here's a post explaining why 1970 was chosen along with the definition:

  • Unix time, or POSIX time, is a system for describing points in time, defined as the number of seconds elapsed since midnight proleptic Coordinated Universal Time (UTC) of January 1, 1970, not counting leap seconds.

Why are dates calculated from January 1st, 1970?

Community
  • 1
  • 1
dcaswell
  • 3,137
  • 2
  • 26
  • 25
  • Many thanks for you but how it is since January 1st, 1970 at midnight GMT.? Just now i test it., or you mean that number is fix on any system starting from since January 1st, 1970 at midnight GMT. – wael Sep 04 '13 at 02:05
  • It's just a convenient starting place that was chosen for historical reasons. There's about 31.6 million seconds per year. So 1.37 billion is about 43 years. – dcaswell Sep 04 '13 at 02:07
  • 137 million is clearly not measured in seconds. See the linked calculator, and how the number mentioned in the original post clearly corresponds to the number of `seconds` (not milliseconds) from January 1st to the 4th September 2013. – dcaswell Sep 04 '13 at 13:11