cfme.utils.timeutil module¶
This module should contain all things associated with time or date that can be shared.
-
class
cfme.utils.timeutil.
parsetime
[source]¶ Bases:
datetime.datetime
Modified class with loaders for our datetime formats.
-
american_date_only_format
= '%m/%d/%y'¶
-
american_minutes
= '%m/%d/%y %H:%M'¶
-
american_minutes_with_utc
= '%m/%d/%y %H:%M UTC'¶
-
american_with_utc_format
= '%m/%d/%y %H:%M:%S UTC'¶
-
classmethod
from_american_date_only
(time_string)[source]¶ Convert the string representation of the time into parsetime()
CFME’s format here is ‘mm/dd/yy’
Parameters: time_string – String with time to parse Returns: :py:class`utils.timeutil.datetime()` object
-
classmethod
from_american_minutes
(time_string)[source]¶ Convert the string representation of the time into parsetime()
CFME’s format here is ‘mm/dd/yy hh:mm’
Parameters: time_string – String with time to parse Returns: :py:class`utils.timeutil.datetime()` object
-
classmethod
from_american_minutes_with_utc
(time_string)[source]¶ Convert the string representation of the time into parsetime()
CFME’s format here is ‘mm/dd/yy hh:mm UTC’
Parameters: time_string – String with time to parse Returns: :py:class`utils.timeutil.datetime()` object
-
classmethod
from_american_with_utc
(time_string)[source]¶ Convert the string representation of the time into parsetime()
CFME’s format here is ‘mm/dd/yy hh:mm:ss UTC’
Parameters: time_string – String with time to parse Returns: :py:class`utils.timeutil.datetime()` object
-
classmethod
from_iso_date
(time_string)[source]¶ Convert the string representation of the time into parsetime()
Format here is ‘YYYY-MM-DD’
Parameters: time_string – String with time to parse Returns: :py:class`utils.timeutil.datetime()` object
-
classmethod
from_iso_with_utc
(time_string)[source]¶ Convert the string representation of the time into parsetime()
CFME’s format here is ‘mm-dd-yy hh:mm:ss UTC’
Parameters: time_string – String with time to parse Returns: :py:class`utils.timeutil.datetime()` object
-
classmethod
from_long_date_format
(time_string)[source]¶ Convert the string representation of the time into parsetime()
Format here is ‘%B %d, %Y %H:%M’.
Parameters: time_string – String with time to parse Returns: :py:class`utils.timeutil.datetime()` object
-
classmethod
from_request_format
(time_string)[source]¶ Convert the string representation of the time into parsetime()
Format here is ‘YYYY-MM-DD-HH-MM-SS’. Used for transmitting data over http
Parameters: time_string – String with time to parse Returns: :py:class`utils.timeutil.datetime()` object
-
classmethod
from_saved_report_title_format
(time_string)[source]¶ Convert the string representation of the time into parsetime()
Format here is ‘%a, %d %b %Y %H:%M:%S +0000’.
Parameters: time_string – String with time to parse Returns: :py:class`utils.timeutil.datetime()` object
-
iso_date_only_format
= '%Y-%m-%d'¶
-
iso_with_utc_format
= '%Y-%m-%d %H:%M:%S UTC'¶
-
long_date_format
= '%B %d, %Y %H:%M'¶
-
request_format
= '%Y-%m-%d-%H-%M-%S'¶
-
saved_report_title_format
= '%a, %d %b %Y %H:%M:%S +0000'¶
-
to_american_date_only
()[source]¶ Convert the this object to string representation in american date only format.
CFME’s format here is ‘mm/dd/yy’
Returns: :py:class`str` object
-
to_american_minutes
()[source]¶ Convert the this object to string representation in american with just minutes.
CFME’s format here is ‘mm/dd/yy hh:mm’
Returns: :py:class`str` object
-
to_american_minutes_with_utc
()[source]¶ Convert the this object to string representation in american with just minutes.
CFME’s format here is ‘mm/dd/yy hh:mm’
Returns: :py:class`str` object
-
to_american_with_utc
()[source]¶ Convert the this object to string representation in american with UTC.
CFME’s format here is ‘mm/dd/yy hh:mm:ss UTC’
Returns: :py:class`str` object
-
to_iso_date
()[source]¶ Convert the this object to string representation in ISO format.
Format here is ‘YYYY-MM-DD’
Returns: :py:class`str` object
-
to_iso_with_utc
()[source]¶ Convert the this object to string representation in american with UTC.
CFME’s format here is ‘mm-dd-yy hh:mm:ss UTC’
Returns: :py:class`str` object
-
to_long_date_format
()[source]¶ Convert the this object to string representation in http request.
Format here is ‘%B %d, %Y %H:%M’
Returns: :py:class`str` object
-