《通链参考手册》


Function DECODE-UNIVERSAL-TIME

●语法设定:

decode-universal-time universal-time &optional time-zone

=> second, minute, hour, date, month, year, day, daylight-p, zone

●参数和值:

universal-time---a universal time.

time-zone---a time zone.

second, minute, hour, date, month, year, day, daylight-p, zone---a decoded time.

●详情:

Returns the decoded time represented by the given universal time.

If time-zone is not supplied, it defaults to the current time zone adjusted for daylight saving time. If time-zone is supplied, daylight saving time information is ignored. The daylight saving time flag is nil if time-zone is supplied.

●例子:

 (decode-universal-time 0 0) =>  0, 0, 0, 1, 1, 1900, 0, false, 0

;; The next two examples assume Eastern Daylight Time.
 (decode-universal-time 2414296800 5) =>  0, 0, 1, 4, 7, 1976, 6, false, 5
 (decode-universal-time 2414293200) =>  0, 0, 1, 4, 7, 1976, 6, true, 5

;; This example assumes that the time zone is Eastern Daylight Time
;; (and that the time zone is constant throughout the example).
 (let* ((here (nth 8 (multiple-value-list (get-decoded-time)))) ;Time zone
        (recently (get-universal-time))
        (a (nthcdr 7 (multiple-value-list (decode-universal-time recently))))
        (b (nthcdr 7 (multiple-value-list (decode-universal-time recently here)))))
   (list a b (equal a b))) =>  ((T 5) (NIL 5) NIL)

●受制于:

Implementation-dependent mechanisms for calculating when or if daylight savings time is in effect for any given session.

●例外情况: 无。

●更多信息:

encode-universal-time, get-universal-time, Section 25.1.4 (Time)

●说明: 无。


X3J13设计清单非标准部分,可查下面章节:


◇首页 § ◎章节目录 § □内容索引 § ○符号索引 § △术语表 § ※设计草案