What is the difference between localtime and getdate in php?

Source: Internet
Author: User
After reading the document, I think these two functions are very similar. they are arrays that return date, time, and other information based on the timestamp. In addition, getdate can replace localtime, so what does localtime mean? After reading the document, I think these two functions are very similar. they are arrays that return date, time, and other information based on the timestamp. In addition, getdate can replace localtime, so what does localtime mean?

Reply content:

After reading the document, I think these two functions are very similar. they are arrays that return date, time, and other information based on the timestamp. In addition, getdate can replace localtime, so what does localtime mean?

localtimeIn the obtained array, the year starts from 1900.


      
  
Array([tm_sec] => 37[tm_min] => 22[tm_hour] => 3[tm_mday] => 9[tm_mon] => 9[tm_year] => 116[tm_wday] => 0[tm_yday] => 282[tm_isdst] => 0)Array([seconds] => 37[minutes] => 22[hours] => 3[mday] => 9[wday] => 0[mon] => 10[year] => 2016[yday] => 282[weekday] => Sunday[month] => October[0] => 1475983357)

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.