Content-Type:text/html 時間関数のテスト

※このサンプルの解説は、「CGIの扉」をすべて読み終えてる方を前提としています。

【時間関数のテスト】
time = 1732196103
gmtime(time) = Thu Nov 21 13:35:03 2024
gmtime() = Thu Nov 21 13:35:03 2024
gmtime = Thu Nov 21 13:35:03 2024
localtime(time) = Thu Nov 21 22:35:03 2024
localtime() = Thu Nov 21 22:35:03 2024
localtime = Thu Nov 21 22:35:03 2024
(localtime)[$i] = 3 35 22 21 10 124 4 325 0
$year $mon $mday $hour $min $sec = 124 10 21 22 35 3
$fmt0 = "%04d/%02d/%02d %02d:%02d:%02d"
sprintf($fmt0, $year+1900,$mon+1,$mday,$hour,$min,$sec) = 2024/11/21 22:35:03
substr(localtime, 0, 3) = Thu

page update:

Copyright (c) 2000-2009, all Rights Reserved & Produced by atom