clock

clock(3tcl)                  Tcl Built-In Commands                 clock(3tcl)



______________________________________________________________________________

NAME
       clock - ç²ååæ縱æé

總覽 SYNOPSIS
       clock option ?arg arg ...?
_________________________________________________________________


æè¿° DESCRIPTION
       éåå½ä»¤é²è¡å¤ç¨®æä½ä¸çæä¸åï¼å¯ä»¥ç²åææ縱表示ä¸äºæéæ¦å¿µ(notion)çå‐
       符串æå¼ãoption åæ¸ç¢ºå®éåå½ä»¤å®æä»éº¼æä½ãåæ³ç options
       (å¯ä»¥ä½¿ç¨ç¸®å¯«) æ:

       clock clicks ?-milliseconds?                                            │
              è¿åä¸åé«è§£æ度(high-                                            │
              resolution)çæéå¼ï¼æ¯ä¸åä¾è³´æ¼ç³»çµ±çæ´æ¸ãå¼çå®ä½æ¯ä¾è³´æ¼ç³»çµ±çä½æ該æ¯ç³»çµ±ä¸å¯ç²å¾çæé«è§£æ度çæéï¼æ¯å¦ä¸å│
              CPU é±æè¨æ¸(counter)ãå¦ææå®äº -milliseconds ï¼åä¿è‐              │
              éåå¼æ¯å¾®ç§çç²åº¦ãéåå¼åªæç¨æ¼æµéäºçæéçç¸å°æ¸¬éã

       clock format clockValue ?-format string? ?-gmt boolean?
              æä¸åæ´æ¸æéå¼è½ææ人å¯é±è®çå½¢å¼ï¼å¸åçï¼éåæéå¼æ¯å¾ clock
              secondsãclock scanãæ file å½ä»¤ç atimeã mtimeãæ ctime
              é¸é è¿åçãå¦æ -format  åæ¸å‐
              å¨ï¼ä¸ä¸ååæ¸æ¯æè¿°å¦ä½æ ¼å¼åæ¥æåæéçä¸åå符串ãå段æ述符ç±ä¸å %
              åé¨å¾çå段æ述符å符çµæãææçå¶ä»å符é½è¤è£½å°çµæä¸ãææçå‐
              段æ述符æ:

              %%     æå¥ä¸å %ã

              %a     ææåç縮寫 (Mon, Tue, etc.)ã

              %A     å®æ´çææå (Monday, Tuesday, etc.)ã

              %b     æåç縮寫 (Jan, Feb, etc.)ã

              %B     å®æ´çæåã

              %c     ç¹å®æ¼æ¬å°çæ¥æåæéã

              %d     æä¸ç第幾天 (01 - 31)ã

              %H     24å°ææ ¼å¼çå°æ(00 - 23)ã

              %I     12å°ææ ¼å¼çå°æ (00 - 12)ã

              %j     å¹´ä¸ç第幾天 (001 - 366)ã

              %m     第幾æ (01 - 12)ã

              %M     å (00 - 59)ã

              %p     AM/PM æ示符ã

              %S     ç§ (00 - 59)ã

              %U     å¹´ä¸ç第幾ææ (00 - 52)ï¼ææ天æ¯ä¸åææä¸ç第ä¸å¤©ã

              %w     ææå¹¾ (Sunday = 0)ã

              %W     å¹´ä¸ç第幾ææ (00 - 52)ï¼ææä¸æ¯ä¸åææä¸ç第ä¸å¤©ã

              %x     ç¹å®æ¼æ¬å°çæ¥ææ ¼å¼ã

              %X     ç¹å®æ¼æ¬å°çæéæ ¼å¼ã

              %y     ä¸ç´ä¸ç第幾年 (00 - 99)ã

              %Y     帶ä¸ç´çå¹´ (ä¾å¦ 1990)ã

              %Z     æååã

              å¨ä¸äºç³»çµ±ä¸æ¯æä¸åè£åçå段æ述符(ä¾å¦å¨ Unix ä¸èä¸å¨
              Windows):

              %D     å½¢å¦ %m/%d/%y çæ¥æã

              %e     æä¸ç第幾天 (1 - 31)ï¼æ²æåå°çé¶ã

              %h     æåç縮寫ã

              %n     æå¥ä¸åæè¡ã

              %r     å½¢å¦ %I:%M:%S %p çæéã

              %R     å½¢å¦ %H:%M çæéã

              %t     æå¥ä¸å tabã

              %T     å½¢å¦ %H:%M:%S çæéã

              å¦ææªæå® -format  åæ¸ï¼ä½¿ç¨æ ¼å¼ä¸² â%a %b %d %H:%M:%S %Z
              %Yâãå¦æ -gmt åæ¸åå¨ï¼ä¸ä¸ååæ¸å¿é æ¯ä¸å boolean
              (å¼)ãå¦ææ¯çåæå®æéä½ç² Greenwich
              æ¨æºæä¾æ ¼å¼åï¼å¦ææ¯åå使ç¨æä½ç°å¢å®ç¾©çæ¬å°æåã

       clock scan dateString ?-base clockVal? ?-gmt boolean?
              æ dateString  è½ææä¸åæ´æ¸æéå¼(åè¦ clock
              seconds)ãéåå½ä»¤å¯åæ並è½æå¹¾ä¹ææçæ¨æºçæ¥æå/ææé串ï¼å¶ä¸‐
              å¯ä»¥åå«æ¨æºçæåå©è¨ç¢¼(mnemonic)ãå¦æåªæå®äºä¸åæéï¼åå®ç²ç¶åçæ¥æãå¦æ串ä¸‐
              ä¸åæ¬ä¸åæåå©è¨ç¢¼ï¼é¤é -gmt åæ¸æ¯çä¹å¤åå®ç²æ¬å°æåï¼å¨ -gmt
              åæ¸æ¯ççææ³ä¸ï¼åå®æå®çæéæ¯ç¸å°æ¼ Greenwich
              æ¨æºæä¾è¨ç®æéå¼ãå¦ææå®äº -gmtï¼å®é»å½±é¿è¨ç®åºçæéå¼ï¼ä¸å½±é¿å°
              -base ç解éã

              å¦ææå®äº -base   æ¨è¨ï¼ä¸ä¸ååæ¸å°åæ¬ä¸åæ´æ¸çæéå¼ãåªä½¿ç¨éåå¼ä¸‐
              çæ¥æèä¸ç®¡æéãéå°ç¢ºå®ç¹å®çæ天çæéæåå¶ä»çç¸å°æ¼æ¥æçè½ææç¨ã

              dateString åå«é¶åæå¤åä¸åå½¢å¼çæå®(specification):

              time   ä¸å¤©ä¸çæéï¼æ¨£å¼æ¯: hh?:mm?:ss??  ?meridian? ?zone? or
                     hhmm ?meridian?  ?zone?. å¦æç²æå®ä¸ä¸å(meridian), hh
                     被解éç²ä¸å24å°æéé»ã

              date   ä¸åç¹å®çæåæ¥ï¼å¹´æ¯å¯é¸çãå¯æ¥åçæ ¼å¼æ¯ mm/dd?/yy?,
                     monthname dd ?, yy?, dd monthname ?yy?, day, dd monthname
                     yy, ?CC?yymmdd, ?CC?yy-mm-dd, dd-monthname-?CC?yy.
                     缺ççå¹´æ¯ç¶åå¹´ãå¦æå¹´å°æ¼ 100ï¼æåæ 00-68 å¹´ä½ç²        │
                     2000-2068 å¹´è 69-99 å¹´ä½ç² 1969-1999                    │
                     å¹´ã注æææå¹³èºé½å¯ä»¥è¡¨ç¤º 38-70 å¹´,                   │
                     æ以å¦æ使ç¨éäºå¹´å°±å¯è½åºé¯ã

              ISO 8601 point-in-time
                     ä¸å ISO 8601 point-in-time æå®ï¼å¦ CCyymmddThhmmss, éè£ T
                     æ¯åé¢ç Tï¼CCyymmdd hhmmss, æè CCyymmddThh:mm:ss.

              relative time
                     ç¸å°ç¶åæéçä¸åæå®ãæ ¼å¼æ¯ number unitï¼å¯æ¥åçå®ä½æ¯ yearã
                     fortnightã monthã weekã dayãhourã minute  min)ãå
                     second  sec)ãå®ä½å¯ä»¥è¢«æå®ç²å®æ¸æè¤æ¸ï¼æ¯å¦ 3
                     weeksãéå¯ä»¥æå®éäºä¿®é£¾ç¬¦: tomorrowã yesterdayãtodayã
                     nowãlastãthisã nextãagoã

              實éçæ¥æè¨ç®ä¾ç§ä¸åçæ‐
              ¥é©ãé¦åï¼èçåè½æææçµå°æ¥æå/ææéã使ç¨éåæéä½ç²åºæº(base),æ·»å ä¸ææå¹¾(day-of-week)æå®ãå¶æ¬¡ï¼ä½¿ç¨ç¸å°æå®ãå¦ææå®äºä¸åæ¥æææ天ï¼ä¸¦ä¸æ²æ給åºçµå°æç¸å°çæéï¼å使ç¨åå¤ãæå¾ï¼é²è¡ä¸æ¬¡æ ¡æ‐
              £ï¼é樣就å¨ä¼°è¨äºå¤ä»¤æä¸åä¹å¾ç¢çæ£ç¢ºçä¸å¤©ä¸‐
              çå°æï¼ä¸¦ä¸å¨å¾ä¸å大æçµæå°ä¸åå°ææ給åºæ£ç¢ºçæ¥æã

              åªå¨ç¨å¦ä¸å®ä½æå®ç¸å°æéçæåé²è¡å¤ä»¤ææ ¡æ£ï¼æ¥ææ´å¤ï¼ä¾å¦  daysã
              weeksã fortnightsãmonths æ yearsãéæå³çè·¨è¶å¤ä»¤æéççæåï¼å° clock
              scan â1 dayâ å clock scan â24 hoursâ å°çµ¦åºä¸åççµæ:
                     % clock scan "1 day" -base [clock scan 1999-10-31]
                     941443200
                     % clock scan "24 hours" -base [clock scan 1999-10-31]
                     941439600

       clock seconds
              æç¶åçæ¥æåæéä½ç²ä¾è³´æ¼ç³»çµ±çæ´æ¸å¼è¿åãå¼çå®ä½æ¯ç§ï¼å許å®è¢«ç¨æ¼ç¸å°æéçè¨ç®ãå¼é常被å®ç¾©æå¾âepochâéå§(è³ä»)總å±æµéçæéãä½ ä¸æ該åå®
              epoch çå¼ã


ééµå KEYWORDS
       clock, date, time

[ä¸æçç¶è·äºº]
       å¯è¬é士

[ä¸æçææ°æ´æ°]
       2001/06/21

ãä¸å Linux è«å£ man æåé ç¿»è¯è¨åã:
       http://cmpp.linuxforum.net

è·
       æ¬é é¢ä¸æçç±ä¸æ man æåé è¨åæä¾ã
       ä¸æ man æåé è¨åï¼https://github.com/man-pages-zh/manpages-zh



Tcl                                   8.3                          clock(3tcl)