<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # C 庫函數 - gmtime() ## 描述 C 庫函數 **struct tm *gmtime(const time_t *timer)** 使用 **timer** 的值來填充 **tm** 結構,并用協調世界時(UTC)也被稱為格林尼治標準時間(GMT)表示。 ## 聲明 下面是 gmtime() 函數的聲明。 ``` struct tm *gmtime(const time_t *timer) ``` ## 參數 * **timeptr** -- 這是指向表示日歷時間的 time_t 值的指針。 ## 返回值 該函數返回指向 tm 結構的指針,該結構帶有被填充的時間信息。下面是 timeptr 結構的細節: ``` struct tm { int tm_sec; /* 秒,范圍從 0 到 59 */ int tm_min; /* 分,范圍從 0 到 59 */ int tm_hour; /* 小時,范圍從 0 到 23 */ int tm_mday; /* 一月中的第幾天,范圍從 1 到 31 */ int tm_mon; /* 月份,范圍從 0 到 11 */ int tm_year; /* 自 1900 起的年數 */ int tm_wday; /* 一周中的第幾天,范圍從 0 到 6 */ int tm_yday; /* 一年中的第幾天,范圍從 0 到 365 */ int tm_isdst; /* 夏令時 */ }; ``` ## 實例 下面的實例演示了 gmtime() 函數的用法。 ``` #include <stdio.h> #include <time.h> #define BST (+1) #define CCT (+8) int main () { time_t rawtime; struct tm *info; time(&rawtime); /* 獲取 GMT 時間 */ info = gmtime(&rawtime ); printf("當前的世界時鐘:\n"); printf("倫敦:%2d:%02d\n", (info->tm_hour+BST)%24, info->tm_min); printf("中國:%2d:%02d\n", (info->tm_hour+CCT)%24, info->tm_min); return(0); } ``` 讓我們編譯并運行上面的程序,這將產生以下結果: ``` 當前的世界時鐘: 倫敦:14:10 中國:21:10 ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看