qiskit-documentation/docs/api/qiskit/0.42/qiskit.providers.ibmq.utils...

35 lines
1.1 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: utc_to_local
description: API reference for qiskit.providers.ibmq.utils.utc_to_local
in_page_toc_min_heading_level: 1
python_api_type: function
python_api_name: qiskit.providers.ibmq.utils.utc_to_local
---
<Admonition title="Warning" type="caution">
The package `qiskit-ibmq-provider` is being deprecated and its repo is going to be archived soon. Please transition to the new packages. More information in [https://ibm.biz/provider\_migration\_guide](https://ibm.biz/provider_migration_guide)
</Admonition>
# qiskit.providers.ibmq.utils.utc\_to\_local
<Function id="qiskit.providers.ibmq.utils.utc_to_local" isDedicatedPage={true} github="https://github.com/qiskit/qiskit-ibmq-provider/tree/stable/0.20/qiskit/providers/ibmq/utils/converters.py" signature="utc_to_local(utc_dt)">
Convert a UTC `datetime` object or string to a local timezone `datetime`.
**Parameters**
**utc\_dt** (`Union`\[`datetime`, `str`]) Input UTC datetime or string.
**Return type**
`datetime`
**Returns**
A `datetime` with the local timezone.
**Raises**
**TypeError** If the input parameter value is not valid.
</Function>