PHP localtime() 函數執行個體教程

來源:互聯網
上載者:User
PHP localtime() 函數執行個體教程
 

定義和用法
在當地時間( )函數返回一個數組,其中包含的時間組成部分的Unix時間戳記。

文法

localtime(timestamp,is_associative)
   
Parameter Description
timestamp Optional. Specifies the date or time to be formatted. If no timestamp is specified, it uses the current local time.
is_associative
任擇。指定是否返回關聯或索引的數組。如果設定為false返回的數組是一個索引數組。如果設定為true然後返回數組是聯想array.The鍵的關聯陣列是: [ tm_sec ] -秒[ t m_min] -分鐘[t m _hour]-小時[ tm _ mday]-一個月的第一天起[tm_ m on]-一個月一年( 1 = 0 ) [ tm_year ] -年限自1 900年以來[ t m_wday] -日的一周內(星期日=0 ) [ t m _yday]-日的一年[ tm _ isdst]-是日光節約時間的影響
Array([0] => 28[1] => 35[2] => 13[3] => 25[4] => 0[5] => 106[6] => 3[7] => 24[8] => 0)
Array([tm_sec] => 28[tm_min] => 35[tm_hour] => 13[tm_mday] => 25[tm_mon] => 0[tm_year] => 106[tm_wday] => 3[tm_yday] => 24[tm_isdst] => 0)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.