@@ -2329,6 +2329,9 @@ msgid ""
23292329"<f-strings>` and when using :meth:`str.format`. For a complete list of "
23302330"formatting directives, see :ref:`strftime-strptime-behavior`."
23312331msgstr ""
2332+ "与 :meth:`.time.strftime` 相同。 此方法使得为 :class:`.time` 对象指定以 :ref:`格式化字符串字面值 "
2333+ "<f-strings>` 表示的格式化字符串以及使用 :meth:`str.format` 进行格式化成为可能。 要获取格式指令的完整列表,请参阅 "
2334+ ":ref:`strftime-strptime-behavior`。"
23322335
23332336#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:1859
23342337msgid ""
@@ -2363,11 +2366,11 @@ msgstr ""
23632366
23642367#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:1883
23652368msgid "Examples of Usage: :class:`.time`"
2366- msgstr ""
2369+ msgstr "用法示例: :class:`.time` "
23672370
23682371#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:1885
23692372msgid "Examples of working with a :class:`.time` object::"
2370- msgstr ""
2373+ msgstr "使用 :class:`.time` 对象的例子:: "
23712374
23722375#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:1916
23732376msgid ":class:`tzinfo` Objects"
@@ -2378,7 +2381,7 @@ msgid ""
23782381"This is an abstract base class, meaning that this class should not be "
23792382"instantiated directly. Define a subclass of :class:`tzinfo` to capture "
23802383"information about a particular time zone."
2381- msgstr ""
2384+ msgstr "这是一个抽象基类,也就是说该类不应被直接实例化。 请定义 :class:`tzinfo` 的子类来捕获有关特定时区的信息。 "
23822385
23832386#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:1924
23842387msgid ""
@@ -2402,6 +2405,9 @@ msgid ""
24022405"represent timezones with fixed offset from UTC such as UTC itself or North "
24032406"American EST and EDT."
24042407msgstr ""
2408+ "你需要派生一个实体子类,并且(至少)提供你使用 :class:`.datetime` 方法所需要的标准 :class:`tzinfo` 方法的实现。 "
2409+ ":mod:`datetime` 模块提供了 :class:`timezone`,这是 :class:`tzinfo` 的一个简单实体子类,它能以与 "
2410+ "UTC 的固定差值来表示不同的时区,例如 UTC 本身或北美的 EST 和 EDT。"
24052411
24062412#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:1937
24072413msgid ""
@@ -2410,20 +2416,26 @@ msgid ""
24102416"can be pickled but possibly not unpickled again. This is a technical "
24112417"requirement that may be relaxed in the future."
24122418msgstr ""
2419+ "对于封存操作的特殊要求:一个 :class:`tzinfo` 子类必须具有可不带参数调用的 :meth:`__init__` "
2420+ "方法,否则它虽然可以被封存,但可能无法再次解封。 这是个技术性要求,在未来可能会被取消。"
24132421
24142422#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:1942
24152423msgid ""
24162424"A concrete subclass of :class:`tzinfo` may need to implement the following "
24172425"methods. Exactly which methods are needed depends on the uses made of aware "
24182426":mod:`datetime` objects. If in doubt, simply implement all of them."
24192427msgstr ""
2428+ "一个 :class:`tzinfo` 的实体子类可能需要实现以下方法。 具体需要实现的方法取决于感知型 :mod:`datetime` 对象如何使用它。"
2429+ " 如果有疑问,可以简单地全都实现。"
24202430
24212431#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:1949
24222432msgid ""
24232433"Return offset of local time from UTC, as a :class:`timedelta` object that is"
24242434" positive east of UTC. If local time is west of UTC, this should be "
24252435"negative."
24262436msgstr ""
2437+ "将本地时间与 UTC 时差返回为一个 :class:`timedelta` 对象,如果本地时区在 UTC 以东则为正值。 如果本地时区在 UTC "
2438+ "以西则为负值。"
24272439
24282440#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:1952
24292441msgid ""
@@ -2435,6 +2447,11 @@ msgid ""
24352447"magnitude of the offset must be less than one day). Most implementations of "
24362448":meth:`utcoffset` will probably look like one of these two::"
24372449msgstr ""
2450+ "这表示与 UTC 的 *总计* 时差;举例来说,如果一个 :class:`tzinfo` 对象同时代表时区和 DST 调整,则 "
2451+ ":meth:`utcoffset` 应当返回两者的和。 如果 UTC 时差不确定则返回 ``None``。 在其他情况下返回值必须为一个 "
2452+ ":class:`timedelta` 对象,其取值严格限制于 ``-timedelta(hours=24)`` 和 "
2453+ "``timedelta(hours=24)`` 之间(差值的幅度必须小于一天)。 大多数 :meth:`utcoffset` "
2454+ "的实现看起来可能像是以下两者之一::"
24382455
24392456#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:1963
24402457msgid ""
@@ -2452,7 +2469,7 @@ msgstr "默认的 :meth:`utcoffset` 实现会引发 :exc:`NotImplementedError`
24522469msgid ""
24532470"Return the daylight saving time (DST) adjustment, as a :class:`timedelta` "
24542471"object or ``None`` if DST information isn't known."
2455- msgstr ""
2472+ msgstr "将夏令时(DST)调整返回为一个 :class:`timedelta` 对象,如果 DST 信息未知则返回 ``None``。 "
24562473
24572474#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:1979
24582475msgid ""
0 commit comments