The Apple system and the Android system do not treat the same time. Did you crawl through this pit?

Source: Internet
Author: User

1) First new date () return time with other Android, PC return time is different on iOS return time is 8 o'clock full time of the day, while Android PC return time is 0 points of the day;

The solution is to judge the system, return to the unified time according to the system

2) The new date () incoming time parameter, such as new date (' 2017-09-11 '), returns the time object, and the time of return is, of course, the first one. But the details of the time, such as new date (' 2017-11-23 09:00:00 ') This method in iOS will be error returned Nolivid date, and on Android PC return no problem

Solution: Use the new Date (' 2017/11/23 09:00:00 ') format to be perfectly compatible with all PC Android iOS systems.

The Apple system and the Android system do not treat the same time. Did you crawl through this pit?

Related Article

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.