The GetTime () method of date in Java a wonderful problem

Source: Internet
Author: User
Tags date1

Today, a wonderful problem has been encountered:

3 Data of date types were read from the database:

Date1:2015-03-12 12:10:42

Date2:2015-03-12 12:04:40

Date3:2015-03-12 11:55:54

Gets the value of the gettime of these 3 objects, respectively:

But here's the problem:

The values of Date1,date2,date3 's gettime () are: 1426090242000,1426089880000,1426132554000

The value of DATE3 's gettime () is greater than that of date1,date2 .... I would not have ....

The question is thrown, and I hope that the great God will see that he can give a lecture .... The little sister thanked me here ....

The GetTime () method of date in Java a wonderful problem

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.