Definition at line 91 of file runlumi.py.
◆ __repr__()
def python.sugar.runlumi.TimestampType.__repr__ |
( |
|
self | ) |
|
Definition at line 95 of file runlumi.py.
96 return str(self.date) +
" UTC"
◆ __str__()
def python.sugar.runlumi.TimestampType.__str__ |
( |
|
self | ) |
|
Definition at line 98 of file runlumi.py.
99 return self.__repr__()
◆ date()
def python.sugar.runlumi.TimestampType.date |
( |
|
self | ) |
|
Definition at line 102 of file runlumi.py.
104 return "([MAX]:[MAX])"
108 return "[InvalidDate]"
◆ from_date()
def python.sugar.runlumi.TimestampType.from_date |
( |
|
cls, |
|
|
|
date |
|
) |
| |
Definition at line 111 of file runlumi.py.
111 def from_date(cls, date):
112 return cls((timegm(date.utctimetuple()) * 1000000000)
113 + 1000*date.microsecond)
◆ from_string()
def python.sugar.runlumi.TimestampType.from_string |
( |
|
cls, |
|
|
|
date_string |
|
) |
| |
Create a TimestampType IOVKey from a %d/%m/%Y string or %H:%M:%S
Definition at line 116 of file runlumi.py.
116 def from_string(cls, date_string):
118 Create a TimestampType IOVKey from a %d/%m/%Y string or %H:%M:%S
121 d = datetime.strptime(date_string,
"%d/%m/%Y")
124 d = datetime.strptime(date_string,
"%d/%m/%Y %H:%M:%S")
126 log.exception(
"Invalid")
129 return cls.from_date(d)
◆ __slots__
tuple python.sugar.runlumi.TimestampType.__slots__ = () |
|
staticprivate |
◆ is_time
bool python.sugar.runlumi.TimestampType.is_time = True |
|
static |
The documentation for this class was generated from the following file: