• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            Matrix
            Klarke's C/C++ Home
            posts - 61,comments - 0,trackbacks - 0

            Here are a few examples. Also see the documentation for the `-d' option in the previous section.

            • To print the date of the day before yesterday:
              date --date='2 days ago'
              
            • To print the date of the day three months and one day hence:
              date --date='3 months 1 day'
              
            • To print the day of year of Christmas in the current year:
              date --date='25 Dec' +%j
              
            • To print the current full month name and the day of the month:
              date '+%B %d'
              
              But this may not be what you want because for the first nine days of the month, the `%d' expands to a zero-padded two-digit field, for example `date -d 1may '+%B %d'' will print `May 01'.
            • To print a date without the leading zero for one-digit days of the month, you can use the (GNU extension) - modifier to suppress the padding altogether.
              date -d=1may '+%B %-d'
              
            • To print the current date and time in the format required by many non-GNU versions of date when setting the system clock:
              date +%m%d%H%M%Y.%S
              
            • To set the system clock forward by two minutes:
              date --set='+2 minutes'
              
            • To print the date in the format specified by RFC-822, use `date --rfc'. I just did and saw this:
              Mon, 25 Mar 1996 23:34:17 -0600
              
            • To convert a date string to the number of seconds since the epoch (which is 1970-01-01 00:00:00 UTC), use the `--date' option with the `%s' format. That can be useful in sorting and/or graphing and/or comparing data by date. The following command outputs the number of the seconds since the epoch for the time one second later than the epoch, but in time zone five hours later (Cambridge, Massachusetts), thus a total of five hours and one second after the epoch:
              date --date='1970-01-01 00:00:01 UTC +5 hours' +%s
              18001
              
              Suppose you had not specified time zone information in the example above. Then, date would have used your computer's idea of the time zone when interpreting the string. Here's what you would get if you were in Greenwich, England:
              # local time zone used
              date --date='1970-01-01 00:00:01' +%s
              1
              
            • If you're sorting or graphing dated data, your raw date values may be represented as seconds since the epoch. But few people can look at the date `946684800' and casually note "Oh, that's the first second of the year 2000."
              date --date='2000-01-01 UTC' +%s
              946684800
              
              To convert such an unwieldy number of seconds back to a more readable form, use a command like this:
              date -d '1970-01-01 946684800 sec' +"%Y-%m-%d %T %z"
              2000-01-01 00:00:00 +0000
              
            posted on 2011-08-05 15:59 Klarke 閱讀(867) 評論(0)  編輯 收藏 引用
            99久久精品免费看国产一区二区三区| 亚洲国产精品无码久久九九| 久久久久人妻一区精品性色av| 看久久久久久a级毛片| 久久香蕉国产线看观看乱码| 久久人人爽人人精品视频| 精品久久久久久中文字幕大豆网| 国产精品一久久香蕉国产线看观看| 久久免费精品一区二区| 久久久久亚洲av综合波多野结衣| 国产精品久久久久无码av| 婷婷国产天堂久久综合五月| 国产精品久久久久国产A级| 久久av免费天堂小草播放| 久久丫精品国产亚洲av| 久久免费国产精品| 日本免费久久久久久久网站| 一本色道久久HEZYO无码| 青青青青久久精品国产h久久精品五福影院1421 | 性做久久久久久久久| 国产精品毛片久久久久久久| 久久频这里精品99香蕉久| 欧美亚洲另类久久综合| 久久精品国产亚洲av水果派| 国内精品久久久久影院亚洲| 青春久久| 无码任你躁久久久久久老妇| 久久国产乱子伦精品免费午夜| 99久久精品午夜一区二区| 久久久久久夜精品精品免费啦| 老男人久久青草av高清| 伊人精品久久久久7777| 青青草国产精品久久久久| 日本一区精品久久久久影院| 久久精品亚洲男人的天堂| 国内精品免费久久影院| 青青青国产成人久久111网站| 国产精品无码久久综合| 国产精品视频久久久| 久久99国产精品二区不卡| 久久久久久a亚洲欧洲aⅴ|