_Extensions_ConvertTo
QuantConnect._Extensions_ConvertTo
__call__
__call__(
time: Union[datetime, date],
_from: Any,
to: Any,
strict: bool = False,
) -> datetime
__call__(value: str, type: Type) -> Object
Signature descriptions:
-
Converts the specified time from the from time zone to the to time zone
-
Converts the specified string value into the specified type
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
time
|
Optional[Union[datetime, date]]
|
The time to be converted in terms of the from time zone |
None
|
_from
|
Optional[Any]
|
The time zone the specified time is in |
None
|
to
|
Optional[Any]
|
The time zone to be converted to |
None
|
strict
|
Optional[bool]
|
True for strict conversion, this will throw during ambiguitities, false for lenient conversion |
False
|
value
|
Optional[str]
|
The string value to be converted |
None
|
type
|
Optional[Type]
|
The output type |
None
|
Returns:
| Type | Description |
|---|---|
datetime | Object
|
Depends on the signature used. Case 1: [The time in terms of the to time zone.]; Case 2: [The converted value.] |
__getitem__
__getitem__(
type: Type[QuantConnect_Extensions_ConvertTo_T],
) -> _Typed_Extensions_ConvertTo[
QuantConnect_Extensions_ConvertTo_T
]