diff --git a/library/time.po b/library/time.po index 1819a31907..62e9fb733d 100644 --- a/library/time.po +++ b/library/time.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-05-09 00:03+0000\n" -"PO-Revision-Date: 2018-05-23 16:12+0000\n" +"PO-Revision-Date: 2024-07-09 08:33+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -17,16 +17,19 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Poedit 3.4.4\n" #: ../../library/time.rst:2 msgid ":mod:`!time` --- Time access and conversions" -msgstr "" +msgstr ":mod:`!time` --- 時間存取與轉換" #: ../../library/time.rst:9 msgid "" "This module provides various time-related functions. For related " "functionality, see also the :mod:`datetime` and :mod:`calendar` modules." msgstr "" +"這個模組提供了各種與時間相關的函式。若要查看相關功能,請參閱 :mod:`datetime` " +"和 :mod:`calendar` 模組。" #: ../../library/time.rst:12 msgid "" @@ -36,16 +39,21 @@ msgid "" "consult the platform documentation, because the semantics of these functions " "varies among platforms." msgstr "" +"雖然這個模組隨時可用,但並非所有函式在所有平台上都可用。這個模組中定義的大多" +"數函式都會呼叫 C 語言平台的函式庫中具有相同名稱的函式。由於這些函式的語義因平" +"台而異,所以偶爾查閱平台文件可能會有所幫助。" #: ../../library/time.rst:18 msgid "An explanation of some terminology and conventions is in order." -msgstr "" +msgstr "以下是對一些術語和慣例的說明。" #: ../../library/time.rst:24 msgid "" "The :dfn:`epoch` is the point where the time starts, the return value of " "``time.gmtime(0)``. It is January 1, 1970, 00:00:00 (UTC) on all platforms." msgstr "" +":dfn:`epoch` 是起始的時間點,即 ``time.gmtime(0)`` 的回傳值。在所有平台上,它" +"是 1970 年 1 月 1 日,00:00:00(UTC)。" #: ../../library/time.rst:31 msgid "" @@ -53,6 +61,9 @@ msgid "" "elapsed seconds since the epoch, typically excluding `leap seconds`_. Leap " "seconds are excluded from this total on all POSIX-compliant platforms." msgstr "" +"術語 :dfn:`seconds since the epoch(紀元秒數)` 是指從 epoch(紀元)開始經過" +"的總秒數,通常不包括 `leap seconds`_。在所有符合 POSIX 標準的平台上,leap " +"seconds (閏秒)都不計入這個總數。" #: ../../library/time.rst:38 msgid "" @@ -60,6 +71,8 @@ msgid "" "epoch_ or far in the future. The cut-off point in the future is determined " "by the C library; for 32-bit systems, it is typically in 2038." msgstr "" +"這個模組中的函式可能無法處理 epoch_ 之前或遙遠未來的日期和時間。未來的臨界點" +"由 C 函式庫決定;對於 32 位元系統來說通常是在 2038 年。" #: ../../library/time.rst:45 msgid "" @@ -68,6 +81,9 @@ msgid "" "POSIX and ISO C standards: values 69--99 are mapped to 1969--1999, and " "values 0--68 are mapped to 2000--2068." msgstr "" +"函式 :func:`strptime` 在給定 ``%y`` 格式程式碼時可以解析兩位數的年份。當剖析" +"兩位數的年份時,它們會根據 POSIX 和 ISO C 標準進行轉換:69--99 的值對映到 " +"1969--1999,0--68 的值對映到 2000--2068。" #: ../../library/time.rst:55 msgid "" @@ -75,6 +91,8 @@ msgid "" "GMT). The acronym UTC is not a mistake but a compromise between English and " "French." msgstr "" +"UTC 是 Coordinated Universal Time --- 世界協調時間(原稱為格林威治標準時間," +"或 GMT)。縮寫 UTC 並不是寫錯,而是英文和法文之間折衷的結果。" #: ../../library/time.rst:61 msgid "" @@ -84,6 +102,10 @@ msgid "" "local rules (often it is read from a system file for flexibility) and is the " "only source of True Wisdom in this respect." msgstr "" +"DST 是 Daylight Saving Time(日光節約時間),一年中的某些時段(通常)將會時區" +"調整一小時。DST 的規則是根據當地法律決定的,且可能每年不同。C 函式庫有一個包" +"含當地規則的表(通常會為了靈活性而從系統文件中讀取),在這方面是唯一的真正依" +"據。" #: ../../library/time.rst:67 msgid "" @@ -91,6 +113,8 @@ msgid "" "by the units in which their value or argument is expressed. E.g. on most " "Unix systems, the clock \"ticks\" only 50 or 100 times a second." msgstr "" +"各種即時 (real-time) 函式的精確度可能低於其值或引數所表示的單位所建議的精確" +"度。例如,在大多數 Unix 系統上,時鐘每秒只「跳」50 次或 100 次。" #: ../../library/time.rst:71 msgid "" @@ -101,6 +125,10 @@ msgid "" "time with a nonzero fraction (Unix :c:func:`!select` is used to implement " "this, where available)." msgstr "" +"另一方面,:func:`.time` 和 :func:`sleep` 的精確度比它們的在 Unix 的等效函式更" +"高:時間以浮點數表示,:func:`.time` 回傳最精確的可用時間(如果可以會使用 " +"Unix 的 :c:func:`!gettimeofday`\\ ),而 :func:`sleep` 可以接受帶有非零分數的" +"時間(如果可以會使用 Unix 的 :c:func:`!select` 來實作)。" #: ../../library/time.rst:78 msgid "" @@ -110,6 +138,10 @@ msgid "" "`gmtime`, :func:`localtime`, and :func:`strptime` also offer attribute names " "for individual fields." msgstr "" +"由 :func:`gmtime`、:func:`localtime` 和 :func:`strptime` 回傳,並由 :func:" +"`asctime`、:func:`mktime` 和 :func:`strftime` 接受的時間值,是一個 9 個整數的" +"序列。:func:`gmtime`、:func:`localtime` 和 :func:`strptime` 的回傳值也為各個" +"欄位提供屬性名稱。" #: ../../library/time.rst:84 msgid "See :class:`struct_time` for a description of these objects." @@ -121,38 +153,42 @@ msgid "" "`~struct_time.tm_gmtoff` and :attr:`~struct_time.tm_zone` attributes when " "platform supports corresponding ``struct tm`` members." msgstr "" +"當平台支援對應的 ``struct tm`` 成員時,:class:`struct_time` 型別被擴展以提" +"供 :attr:`~struct_time.tm_gmtoff` 和 :attr:`~struct_time.tm_zone` 屬性。" #: ../../library/time.rst:92 msgid "" "The :class:`struct_time` attributes :attr:`~struct_time.tm_gmtoff` and :attr:" "`~struct_time.tm_zone` are now available on all platforms." msgstr "" +":class:`struct_time` 的屬性 :attr:`~struct_time.tm_gmtoff` 和 :attr:" +"`~struct_time.tm_zone` 現在在所有平台上都可用。" #: ../../library/time.rst:97 msgid "Use the following functions to convert between time representations:" -msgstr "" +msgstr "使用以下函式在時間表示之間進行轉換:" #: ../../library/time.rst:100 msgid "From" -msgstr "" +msgstr "轉換來源" #: ../../library/time.rst:100 msgid "To" -msgstr "" +msgstr "轉換目標" #: ../../library/time.rst:100 msgid "Use" -msgstr "" +msgstr "使用" #: ../../library/time.rst:29 ../../library/time.rst:102 #: ../../library/time.rst:105 ../../library/time.rst:108 #: ../../library/time.rst:111 msgid "seconds since the epoch" -msgstr "" +msgstr "紀元秒數" #: ../../library/time.rst:102 ../../library/time.rst:108 msgid ":class:`struct_time` in UTC" -msgstr "" +msgstr "世界協調時間的 :class:`struct_time`" #: ../../library/time.rst:102 msgid ":func:`gmtime`" @@ -160,7 +196,7 @@ msgstr ":func:`gmtime`" #: ../../library/time.rst:105 ../../library/time.rst:111 msgid ":class:`struct_time` in local time" -msgstr "" +msgstr "本地時間的 :class:`struct_time`" #: ../../library/time.rst:105 msgid ":func:`localtime`" @@ -185,24 +221,30 @@ msgid "" "Jun 20 23:21:05 1993'``. The day field is two characters long and is space " "padded if the day is a single digit, e.g.: ``'Wed Jun 9 04:26:40 1993'``." msgstr "" +"將由 :func:`gmtime` 或 :func:`localtime` 回傳的元組或 :class:`struct_time` 表" +"示的時間轉換為以下格式的字串:``'Sun Jun 20 23:21:05 1993'``。日期欄位為兩個" +"字元長,如果日期是個位數,則用空格填充,例如:``'Wed Jun 9 04:26:40 " +"1993'``。" #: ../../library/time.rst:129 msgid "" "If *t* is not provided, the current time as returned by :func:`localtime` is " "used. Locale information is not used by :func:`asctime`." msgstr "" +"如果沒有提供 *t*,則使用由 :func:`localtime` 回傳的當前時間。:func:`asctime` " +"不使用區域資訊。" #: ../../library/time.rst:134 msgid "" "Unlike the C function of the same name, :func:`asctime` does not add a " "trailing newline." -msgstr "" +msgstr "與同名的 C 函式不同,:func:`asctime` 不會添加結尾的換行字元。" #: ../../library/time.rst:139 msgid "" "Return the *clk_id* of the thread-specific CPU-time clock for the specified " "*thread_id*." -msgstr "" +msgstr "為指定的 *thread_id* 回傳執行緒專用 CPU-time 時鐘的 *clk_id*。" #: ../../library/time.rst:141 msgid "" @@ -210,12 +252,16 @@ msgid "" "attribute of :class:`threading.Thread` objects to get a suitable value for " "*thread_id*." msgstr "" +"使用 :func:`threading.get_ident` 或 :class:`threading.Thread` 物件的 :attr:" +"`~threading.Thread.ident` 屬性來獲取適用於 *thread_id* 的值。" #: ../../library/time.rst:146 msgid "" "Passing an invalid or expired *thread_id* may result in undefined behavior, " "such as segmentation fault." msgstr "" +"傳遞無效或過期的 *thread_id* 可能會導致未定義的行為,例如分段錯誤 " +"(segmentation fault)。" #: ../../library/time.rst:149 msgid ":ref:`Availability `: Unix" @@ -225,13 +271,15 @@ msgstr ":ref:`適用 `:Unix" msgid "" "See the man page for :manpage:`pthread_getcpuclockid(3)` for further " "information." -msgstr "" +msgstr "若需更多資訊,請參閱 :manpage:`pthread_getcpuclockid(3)` 的說明文件。" #: ../../library/time.rst:158 msgid "" "Return the resolution (precision) of the specified clock *clk_id*. Refer " "to :ref:`time-clock-id-constants` for a list of accepted values for *clk_id*." msgstr "" +"回傳指定時鐘 *clk_id* 的解析度(精確度)。有關 *clk_id* 可接受的值的串列,請" +"參閱 :ref:`time-clock-id-constants`。" #: ../../library/time.rst:161 ../../library/time.rst:174 #: ../../library/time.rst:183 ../../library/time.rst:196 @@ -246,32 +294,39 @@ msgid "" "Return the time of the specified clock *clk_id*. Refer to :ref:`time-clock-" "id-constants` for a list of accepted values for *clk_id*." msgstr "" +"回傳指定時鐘 *clk_id* 的時間。有關 *clk_id* 可接受的值的串列,請參閱 :ref:" +"`time-clock-id-constants`。" #: ../../library/time.rst:171 msgid "" "Use :func:`clock_gettime_ns` to avoid the precision loss caused by the :" "class:`float` type." msgstr "" +"使用 :func:`clock_gettime_ns` 以避免 :class:`float` 型別造成的精確度損失。" #: ../../library/time.rst:181 msgid "Similar to :func:`clock_gettime` but return time as nanoseconds." msgstr "" +"類似於 :func:`clock_gettime`,但回傳以奈秒 (nanoseconds) 為單位的時間。" #: ../../library/time.rst:190 msgid "" "Set the time of the specified clock *clk_id*. Currently, :data:" "`CLOCK_REALTIME` is the only accepted value for *clk_id*." msgstr "" +"設定指定時鐘 *clk_id* 的時間。目前,:data:`CLOCK_REALTIME` 是 *clk_id* 唯一可" +"以接受的值。" #: ../../library/time.rst:193 msgid "" "Use :func:`clock_settime_ns` to avoid the precision loss caused by the :" "class:`float` type." msgstr "" +"使用 :func:`clock_settime_ns` 以避免 :class:`float` 型別造成的精確度損失。" #: ../../library/time.rst:203 msgid "Similar to :func:`clock_settime` but set time with nanoseconds." -msgstr "" +msgstr "類似於 :func:`clock_settime`,但設定以奈秒為單位的時間。" #: ../../library/time.rst:212 msgid "" @@ -280,6 +335,9 @@ msgid "" "characters long and is space padded if the day is a single digit, e.g.: " "``'Wed Jun 9 04:26:40 1993'``." msgstr "" +"將自 epoch_ 起以秒表示的時間轉換為表示當地時間且符合以下格式的字串:``'Sun " +"Jun 20 23:21:05 1993'``。日期欄位為兩個字元長,如果日期是個位數,則用空格填" +"充,例如:``'Wed Jun 9 04:26:40 1993'``。" #: ../../library/time.rst:217 msgid "" @@ -288,12 +346,17 @@ msgid "" "``asctime(localtime(secs))``. Locale information is not used by :func:" "`ctime`." msgstr "" +"如果未提供 *secs* 或其為 :const:`None`,則使用由 :func:`.time` 回傳的當前時" +"間。``ctime(secs)`` 等同於 ``asctime(localtime(secs))``。:func:`ctime` 不使用" +"區域資訊。" #: ../../library/time.rst:225 msgid "" "Get information on the specified clock as a namespace object. Supported " "clock names and the corresponding functions to read their value are:" msgstr "" +"獲取指定時鐘的資訊作為命名空間物件。支援的時鐘名稱及讀取他們的值的對應函式如" +"下:" #: ../../library/time.rst:229 msgid "``'monotonic'``: :func:`time.monotonic`" @@ -317,28 +380,32 @@ msgstr "``'time'``::func:`time.time`" #: ../../library/time.rst:235 msgid "The result has the following attributes:" -msgstr "" +msgstr "其結果具有以下屬性:" #: ../../library/time.rst:237 msgid "" "*adjustable*: ``True`` if the clock can be changed automatically (e.g. by a " "NTP daemon) or manually by the system administrator, ``False`` otherwise" msgstr "" +"*adjustable*: 如果時鐘可以自動(例如,透過 NTP 常駐程式)或由系統管理員手動更" +"改,則為 ``True``,否則為 ``False``" #: ../../library/time.rst:239 msgid "" "*implementation*: The name of the underlying C function used to get the " "clock value. Refer to :ref:`time-clock-id-constants` for possible values." msgstr "" +"*implementation*: 用於獲取時鐘的值的底層 C 函式名稱。有關可能的值,請參閱 :" +"ref:`time-clock-id-constants`。" #: ../../library/time.rst:241 msgid "" "*monotonic*: ``True`` if the clock cannot go backward, ``False`` otherwise" -msgstr "" +msgstr "*monotonic*: 如果時鐘不能倒轉,則為 ``True``,否則為 ``False``" #: ../../library/time.rst:243 msgid "*resolution*: The resolution of the clock in seconds (:class:`float`)" -msgstr "" +msgstr "*resolution*: 以秒 (:class:`float`) 為單位的時鐘的解析度" #: ../../library/time.rst:250 msgid "" @@ -349,6 +416,10 @@ msgid "" "the :class:`struct_time` object. See :func:`calendar.timegm` for the inverse " "of this function." msgstr "" +"將自 epoch_ 起以秒表示的時間轉換為 UTC 中的 :class:`struct_time`,其中 dst 旗" +"標始終為零。如果未提供 *secs* 或其為 :const:`None`,則使用由 :func:`.time` 回" +"傳的當前時間。忽略秒的分數部分。關於 :class:`struct_time` 物件的描述,請參閱" +"上文。此函式的反運算請參閱 :func:`calendar.timegm`。" #: ../../library/time.rst:260 msgid "" @@ -356,6 +427,9 @@ msgid "" "or :const:`None`, the current time as returned by :func:`.time` is used. " "The dst flag is set to ``1`` when DST applies to the given time." msgstr "" +"類似於 :func:`gmtime`,但轉換為當地時間。如果未提供 *secs* 或其為 :const:" +"`None`,則使用由 :func:`.time` 回傳的當前時間。當 DST 適用於給定時間時,dst " +"旗標會被設定為 ``1``。" #: ../../library/time.rst:264 msgid "" @@ -365,6 +439,10 @@ msgid "" "c:func:`gmtime` failure. It's common for this to be restricted to years " "between 1970 and 2038." msgstr "" +"如果時間戳超出 C 平台的 :c:func:`localtime` 或 :c:func:`gmtime` 函式支援的範" +"圍,:func:`localtime` 可能會引發 :exc:`OverflowError`;在 :c:func:" +"`localtime` 或 :c:func:`gmtime` 失敗時,會引發 :exc:`OSError`。通常會把年份限" +"制在 1970 年到 2038 年之間。" #: ../../library/time.rst:273 msgid "" @@ -378,6 +456,12 @@ msgid "" "libraries). The earliest date for which it can generate a time is platform-" "dependent." msgstr "" +"這是 :func:`localtime` 的反函式。其引數是表示\\ *當地*\\ 時間(不是 UTC)的 :" +"class:`struct_time` 或完整的 9 元組(因為需要 dst 旗標;如果 dst 為未知,則使" +"用 ``-1`` 作為 dst 旗標)。它回傳一個浮點數,以與 :func:`.time` 相容。如果輸" +"入值不能表示為有效時間,將引發 :exc:`OverflowError` 或 :exc:`ValueError`\\ " +"(取決於無效值是被 Python 還是底層 C 函式庫捕獲)。它能生成時間的最早日期根據" +"平台而有所不同。" #: ../../library/time.rst:285 msgid ""