Day23(0207) <<
Previous Next >> calendar模組
日期時間函式(二)
7.time.localtime(secs):與time.gmtime相似,但傳回的是目前的本地時間。
8.time.asctime(t):以str型別傳回目前的本地時間或選擇性參數t指定的時間。
9.time.ctime(secs):與time.asctime,但選擇性參數secs是從1970年1月1日上午12時00分所經過的秒數。
10.time.mktime(t):傳回從1970年1月1日上午12時00分到參數t指定的時間所經過的秒數。
11.time.sleep(secs):另Python暫停參數secs所指定的秒數。
12.time.strftime(format,t):根據參數format所指定的格式,將time.gmtime()或time.localtime()函式傳回目前的時間,轉換為字串。
Day23(0207) <<
Previous Next >> calendar模組