• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is "12:59 AM" .LT. "01:00 AM"?

 
Guennadiy VANIN
Ranch Hand
Posts: 898
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
where ".LT." means immediately before.
I just need to sinchronize watches of server and client and I couldn't find this information.
I tried rolling watches of MS Windows but it does not give any answer since changes of min, hrs, sec, PM/AM happen independently
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. (Where "immediately before" means "one minute before".) Usually it's easiest in Java to convert all times to java.util.Date objects, which con handle most comparisons like this for you.
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So the question is:
Is "12:59 AM" immediately before "01:00 AM"?
The answer is yes. Keep in mind thought that alot of stuff is kept track of in milliseconds behind the scenes.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah, Dave - if only we'd both posted ten minutes later. (Or 12:10 later I suppose.)
 
Guennadiy VANIN
Ranch Hand
Posts: 898
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys,
since before is the relative notion, I have used "immediately" while I really mean at the same date (but I was not interested to overburden me with dates also).
I know that time is indivisable even inside finite range
[ January 04, 2003: Message edited by: G Vanin ]
 
Marilyn de Queiroz
Sheriff
Posts: 9067
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you looked at the Date class, did you notice the method getTime() ?
 
Guennadiy VANIN
Ranch Hand
Posts: 898
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, certainly.
There are even methods for comparisons and even between different time zones over the internet, etc.
Programmers also need to understand some intricacies...
I just try avoiding posting meaningless (in MD). But the question was about time conventions, not Java. Though it is addressed by JAVA and even caused very big troubles at some time by some versions
... thanks again
[ January 11, 2003: Message edited by: yidanneuG ninaV ]
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this a Java question or another complaint about the Book Promotion?
 
Guennadiy VANIN
Ranch Hand
Posts: 898
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I deleted my phrase about Book Promotion.
It is not neither Java nor Book Promotion nor Meaningless question. It is interdisciplinary (ubiquitous). If you know, you know (if you don't, you go to JR)
[ January 11, 2003: Message edited by: yidanneuG ninaV ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic