84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
刚刚看文档,感觉这两个函数很相似,都是根据时间戳返回日期,时间等信息的数组,而且从返回的信息上来看getdate完全可以取代localtime,那么请问localtime存在的意义是什么呢?
认证0级讲师
localtime获取的数组中,年是从 1900 开始的
localtime
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 )
localtime
获取的数组中,年是从 1900 开始的