MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / time

Class time

tools/python-3.11.9-amd64/Lib/datetime.py:1311–1656  ·  view source on GitHub ↗

Time with time zone. Constructors: __new__() Operators: __repr__, __str__ __eq__, __le__, __lt__, __ge__, __gt__, __hash__ Methods: strftime() isoformat() utcoffset() tzname() dst() Properties (readonly): hour, minute, se

Source from the content-addressed store, hash-verified

1309_tzinfo_class = tzinfo
1310
1311class time:
1312 """Time with time zone.
1313
1314 Constructors:
1315
1316 __new__()
1317
1318 Operators:
1319
1320 __repr__, __str__
1321 __eq__, __le__, __lt__, __ge__, __gt__, __hash__
1322
1323 Methods:
1324
1325 strftime()
1326 isoformat()
1327 utcoffset()
1328 tzname()
1329 dst()
1330
1331 Properties (readonly):
1332 hour, minute, second, microsecond, tzinfo, fold
1333 """
1334 __slots__ = '_hour', '_minute', '_second', '_microsecond', '_tzinfo', '_hashcode', '_fold'
1335
1336 def __new__(cls, hour=0, minute=0, second=0, microsecond=0, tzinfo=None, *, fold=0):
1337 """Constructor.
1338
1339 Arguments:
1340
1341 hour, minute (required)
1342 second, microsecond (default to zero)
1343 tzinfo (default to None)
1344 fold (keyword only, default to zero)
1345 """
1346 if (isinstance(hour, (bytes, str)) and len(hour) == 6 and
1347 ord(hour[0:1])&0x7F < 24):
1348 # Pickle support
1349 if isinstance(hour, str):
1350 try:
1351 hour = hour.encode('latin1')
1352 except UnicodeEncodeError:
1353 # More informative error message.
1354 raise ValueError(
1355 "Failed to encode latin1 string when unpickling "
1356 "a time object. "
1357 "pickle.load(data, encoding='latin1') is assumed.")
1358 self = object.__new__(cls)
1359 self.__setstate(hour, minute or None)
1360 self._hashcode = -1
1361 return self
1362 hour, minute, second, microsecond, fold = _check_time_fields(
1363 hour, minute, second, microsecond, fold)
1364 _check_tzinfo_arg(tzinfo)
1365 self = object.__new__(cls)
1366 self._hour = hour
1367 self._minute = minute
1368 self._second = second

Callers 13

handle_requestMethod · 0.90
putMethod · 0.90
getMethod · 0.90
_getdateFunction · 0.90
match_to_localtimeFunction · 0.90
match_to_localtimeFunction · 0.90
timerFunction · 0.90
match_to_localtimeFunction · 0.90
__hash__Method · 0.85
datetime.pyFile · 0.85
timeMethod · 0.85
timetzMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected