Time format of PHP4 and PHP5 _ PHP Tutorial

Source: Internet
Author: User
The time format of PHP4 and PHP5 is incorrect. PHP 5 on your computer. PHP 4 on the server. Upload the time on your machine. The program is written from 2008 to 2-1414: 56: 29 and uploaded to a string of numbers. 1202972189 the access... field used by the database defaults to php5on your computer.

On the server, PHP4.

Time on your machine, 14:56:29
Write the program and convert it into a string of numbers. 1202972189

The default value of the access... field used by the database is Now ()
Solution:
This is correct. this number is Unix timestamp, which indicates the number of seconds from January 1, to the present. it usually needs to be formatted and displayed.

Date ('Y-m-D', 1202972189)
The result is 2008-02-14.

Example. on the server, run PHP4. on your machine, run the program 2008-2-1414: 56: 29, and upload it to a string of numbers. 1202972189 default value of the access... field used by the database...

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.