Home
last modified time | relevance | path

Searched refs:datetime (Results 1 – 25 of 350) sorted by relevance

12345678910>>...14

/external/python/cpython3/Lib/test/test_email/
Dtest_utils.py1 import datetime
14 utcoffset = datetime.timedelta(hours=-7)
15 tz = datetime.timezone(utcoffset)
16 naive_dt = datetime.datetime(*dateargs)
17 aware_dt = datetime.datetime(*dateargs, tzinfo=tz)
28 utc_dt = datetime.datetime(*self.dateargs,
29 tzinfo=datetime.timezone.utc)
66 t0 = datetime.datetime(2012, 3, 12, 1, 1)
73 t0 = datetime.datetime(2012, 3, 12, 1, 1)
80 t0 = datetime.datetime(2012, 3, 12, 1, 1)
[all …]
/external/python/cpython3/Lib/email/
Dutils.py30 import datetime
159 dt = datetime.datetime.fromtimestamp(timeval, datetime.timezone.utc)
161 dt = datetime.datetime.utcfromtimestamp(timeval)
176 if dt.tzinfo is None or dt.tzinfo != datetime.timezone.utc:
212 return datetime.datetime(*dtuple[:6])
213 return datetime.datetime(*dtuple[:6],
214 tzinfo=datetime.timezone(datetime.timedelta(seconds=tz)))
360 return datetime.datetime.now(datetime.timezone.utc).astimezone()
370 delta = datetime.timedelta(seconds=localtm.tm_gmtoff)
371 tz = datetime.timezone(delta, localtm.tm_zone)
[all …]
/external/autotest/client/common_lib/
Dtime_utils.py7 import datetime
45 return datetime.datetime.strptime(time_string, TIME_FMT)
47 return datetime.datetime.strptime(time_string, TIME_FMT_MICRO)
77 return datetime.datetime.fromtimestamp(
97 if isinstance(value, datetime.datetime):
118 epoch = datetime.datetime(1970, 1, 1, tzinfo=pytz.utc)
/external/autotest/client/tests/wb_kupdate/
Dwb_kupdate_unittest.py4 import datetime
30 start_time=datetime.datetime.now(),
35 start_time=datetime.datetime.now(),
37 _now=datetime.datetime.now() + datetime.timedelta(seconds=60)))
60 self._wbkupdate_obj._wait_until_data_flushed(datetime.datetime.now(),
87 start_time=datetime.datetime.now(),
Dwb_kupdate.py1 import datetime, logging, os, time
89 time_diff = datetime.datetime.now() - start_time
92 return time_diff <= datetime.timedelta(seconds=duration*60)
113 write_completion_time = datetime.datetime.now()
168 return datetime.datetime.now() - start_time
220 test_start_time = datetime.datetime.now()
/external/python/cpython2/Lib/sqlite3/
Ddbapi2.py25 import datetime
36 Date = datetime.date
38 Time = datetime.time
40 Timestamp = datetime.datetime
65 return datetime.date(*map(int, val.split("-")))
77 val = datetime.datetime(year, month, day, hours, minutes, seconds, microseconds)
81 register_adapter(datetime.date, adapt_date)
82 register_adapter(datetime.datetime, adapt_datetime)
/external/python/cpython3/Lib/sqlite3/
Ddbapi2.py23 import datetime
35 Date = datetime.date
37 Time = datetime.time
39 Timestamp = datetime.datetime
64 return datetime.date(*map(int, val.split(b"-")))
76 val = datetime.datetime(year, month, day, hours, minutes, seconds, microseconds)
80 register_adapter(datetime.date, adapt_date)
81 register_adapter(datetime.datetime, adapt_datetime)
/external/python/cpython2/Doc/library/
Ddatetime.rst1 :mod:`datetime` --- Basic date and time types
4 .. module:: datetime
14 The :mod:`datetime` module supplies classes for manipulating dates and times in
35 For applications requiring aware objects, :class:`.datetime` and :class:`.time`
40 that no concrete :class:`tzinfo` classes are supplied by the :mod:`datetime`
46 The :mod:`datetime` module exports the following constants:
50 The smallest year number allowed in a :class:`date` or :class:`.datetime` object.
56 The largest year number allowed in a :class:`date` or :class:`.datetime` object.
89 .. class:: datetime
101 or :class:`.datetime` instances to microsecond resolution.
[all …]
/external/python/cpython3/Doc/library/
Ddatetime.rst1 :mod:`datetime` --- Basic date and time types
4 .. module:: datetime
11 **Source code:** :source:`Lib/datetime.py`
17 The :mod:`datetime` module supplies classes for manipulating dates and times in
38 For applications requiring aware objects, :class:`.datetime` and :class:`.time`
44 supplied by the :mod:`datetime` module. The :class:`timezone` class can
51 The :mod:`datetime` module exports the following constants:
55 The smallest year number allowed in a :class:`date` or :class:`.datetime` object.
61 The largest year number allowed in a :class:`date` or :class:`.datetime` object.
94 .. class:: datetime
[all …]
/external/autotest/site_utils/sponge_lib/
Dsponge_utils_functional_test.py12 import datetime
118 job.started_time = datetime.datetime(2016, 8, 15, 0, 0, 0)
119 job.finished_time = datetime.datetime(2016, 8, 15, 1, 0, 0)
138 test.started_time = datetime.datetime(2016, 8, 15, 0, 0, 0)
139 test.finished_time = datetime.datetime(2016, 8, 15, 1, 0, 0)
/external/autotest/site_utils/rpm_control_system/
Drpm_logging_config.py4 import datetime
26 _suspend_start_time = datetime.datetime.now()
35 self._suspend_start_time = datetime.datetime.now()
52 if datetime.datetime.now() < (self._suspend_start_time +
53 datetime.timedelta(hours=self._suspend_time_hrs)):
/external/autotest/utils/
Dsite_check_dut_usage.py15 import datetime
86 total_run_time = datetime.timedelta()
87 total_queued_time = datetime.timedelta()
117 print 'Average Job Time ', datetime.timedelta(seconds=int(
119 print 'Average Time Job Queued ', datetime.timedelta(seconds=int(
159 return (datetime.datetime.strptime(start_time, _DATE_FORMAT).date(),
160 datetime.datetime.strptime(end_time, _DATE_FORMAT).date(),
/external/python/cpython3/Doc/includes/
Dtzinfo-examples.py1 from datetime import tzinfo, timedelta, datetime, timezone
25 stamp = (dt - datetime(1970, 1, 1, tzinfo=self)) // SECOND
30 return datetime(*args, microsecond=dt.microsecond,
78 DSTSTART_2007 = datetime(1, 3, 8, 2)
80 DSTEND_2007 = datetime(1, 11, 1, 2)
84 DSTSTART_1987_2006 = datetime(1, 4, 1, 2)
85 DSTEND_1987_2006 = datetime(1, 10, 25, 2)
90 DSTSTART_1967_1986 = datetime(1, 4, 24, 2)
103 return (datetime(year, 1, 1), ) * 2
/external/autotest/tko/
Djob_serializer.py13 import datetime
24 datetime = datetime.datetime variable
39 'queued_time':datetime,
40 'started_time':datetime,
41 'finished_time':datetime,
44 'aborted_on':datetime,
54 'started_time':datetime,
55 'finished_time':datetime,
386 elif field_type == datetime:
388 datetime.fromtimestamp(value/1000.0))
[all …]
/external/autotest/client/cros/video/
Dcollect_golden_images.py5 import argparse, common, datetime
70 tmp = datetime.datetime.strptime(args.start, time_format)
71 start = datetime.timedelta(minutes=tmp.minute, seconds=tmp.second)
91 tmp = datetime.datetime.strptime(args.stop, time_format)
92 stop = datetime.timedelta(minutes=tmp.minute, seconds=tmp.second)
/external/python/cpython3/Doc/includes/sqlite3/
Dadapter_datetime.py2 import datetime
8 sqlite3.register_adapter(datetime.datetime, adapt_datetime)
13 now = datetime.datetime.now()
/external/python/cpython2/Doc/includes/sqlite3/
Dadapter_datetime.py2 import datetime, time
7 sqlite3.register_adapter(datetime.datetime, adapt_datetime)
12 now = datetime.datetime.now()
/external/toolchain-utils/deprecated/
Dsheriff_rotation.py15 import datetime
32 def GetWeekInfo(self, day=datetime.datetime.today()):
35 epoch = datetime.datetime.utcfromtimestamp(0)
41 week_begin = day - datetime.timedelta(days=day_of_week)
42 week_end = day + datetime.timedelta(days=(6 - day_of_week))
/external/autotest/site_utils/
Ddiagnosis_utils.py7 import datetime as datetime_base
9 from datetime import datetime
114 self.deadline = datetime.now() + datetime_base.timedelta(
136 if not self.deadline or datetime.now() < self.deadline:
156 self.job_created_time = datetime.fromtimestamp(job_created_time)
180 return datetime.now() - self.job_created_time
192 self.format_time(datetime.now()))
235 end_time = datetime.now()
348 JobTimer.format_time(datetime.now()),
/external/autotest/client/site_tests/hardware_TPMtspi/
Dhardware_TPMtspi.py5 import datetime
30 start_time = datetime.datetime.now()
70 end_time = datetime.datetime.now()
/external/autotest/contrib/
Dloadtest.py42 import datetime
162 self.start_time = datetime.datetime.now()
180 self.finish_time = datetime.datetime.now()
229 self.finish_time = datetime.datetime.now()
241 finish_time = self.finish_time or datetime.datetime.now()
252 self.start_time = datetime.datetime.now()
274 int(time_utils.to_epoch_time(datetime.datetime.now())))
286 now = datetime.datetime.now()
451 self.finish_time = datetime.datetime.now()
457 finish_time = self.finish_time or datetime.datetime.now()
/external/python/cpython2/Doc/c-api/
Ddatetime.rst8 Various date and time objects are supplied by the :mod:`datetime` module.
9 Before using any of these functions, the header file :file:`datetime.h` must be
103 Return a ``datetime.date`` object with the specified year, month and day.
110 Return a ``datetime.datetime`` object with the specified year, month, day, hour,
118 Return a ``datetime.time`` object with the specified hour, minute, second and
126 Return a ``datetime.timedelta`` object representing the given number of days,
129 ``datetime.timedelta`` objects.
159 Macros to extract fields from datetime objects. The argument must be an
228 Create and return a new ``datetime.datetime`` object given an argument tuple
229 suitable for passing to ``datetime.datetime.fromtimestamp()``.
[all …]
/external/autotest/venv/lucifer/
Dhandoffs.py11 import datetime
36 cutoff = (datetime.datetime.now()
37 - datetime.timedelta(seconds=_JOB_GRACE_SECS))
69 .update(finished_on=datetime.datetime.now()))
/external/python/cpython3/Doc/c-api/
Ddatetime.rst8 Various date and time objects are supplied by the :mod:`datetime` module.
9 Before using any of these functions, the header file :file:`datetime.h` must be
82 Return a ``datetime.date`` object with the specified year, month and day.
87 Return a ``datetime.datetime`` object with the specified year, month, day, hour,
93 Return a ``datetime.time`` object with the specified hour, minute, second and
99 Return a ``datetime.timedelta`` object representing the given number of days,
102 ``datetime.timedelta`` objects.
125 Macros to extract fields from datetime objects. The argument must be an
202 Create and return a new ``datetime.datetime`` object given an argument tuple
203 suitable for passing to ``datetime.datetime.fromtimestamp()``.
[all …]
/external/python/cpython2/Doc/includes/
Dtzinfo-examples.py1 from datetime import tzinfo, timedelta, datetime
101 DSTSTART_2007 = datetime(1, 3, 8, 2)
103 DSTEND_2007 = datetime(1, 11, 1, 1)
107 DSTSTART_1987_2006 = datetime(1, 4, 1, 2)
108 DSTEND_1987_2006 = datetime(1, 10, 25, 1)
113 DSTSTART_1967_1986 = datetime(1, 4, 24, 2)

12345678910>>...14