The date obtained from the database is automatically reduced by 2 days.

Source: Internet
Author: User

Yesterday, the BI project team encountered a very strange problem. The date type value returned from the database was automatically deducted for two days when it was returned to java.

There is no problem with the same date and time type.

For example, the result obtained from the query analyzer is 2014/02/28. This value is automatically changed to 2014/02/26 in java.

Error display result:

Correct display result:

The date of the database server/AP server is normal.

There are no similar cases for Google and Baidu search. (The time difference is several hours)

We had to temporarily convert the returned results of BI involving dates into strings for processing.

The returned results of some stored procedures are also directly added for 2 days.

---------------------------------------------------------------------------------

After repeated investigations today, we found that the problem was caused by the sqljdbc4.jar package.

The java Development Team uploaded the local sqljdbc4.jar package by mistake when uploading the zip jar package.

The local sqljdbc4.jar package is freely downloaded from the internet ......

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.