• Post Reply Bookmark Topic Watch Topic
  • New Topic

milliseconds in session  RSS feed

 
Singh Anisha
Ranch Hand
Posts: 100
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Methode of session :-
getCreationTime()
getLastAccessedTime()
these methods returns value in milliseconds, but i am unable to understand (since 1970 part).
can someone please help me to understand this output.
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Singh Anisha wrote: but i am unable to understand (since 1970 part).
can someone please help me to understand this output.


That's the date which Java uses as the "epoch". Read this for more information https://en.wikipedia.org/wiki/Epoch_%28reference_date%29
 
Singh Anisha
Ranch Hand
Posts: 100
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Still its not clear to me..
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let's turn it around: if those methods returned a 0, what do you think that would mean?

And the next question: if you write down the number that is returned from one of those methods, and then convert it to years, months, days, etc. (keeping in mind that that number is in milliseconds), what result do you get?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!