## TimeZoneInfo::GetUtcOffset(const DateTimeOffset\&) const method


计算指定日期和时间在此时区与 UTC 时区之间的时间差。

```cpp
TimeSpan System::TimeZoneInfo::GetUtcOffset(const DateTimeOffset &date_time_offset) const
```


| 参数 | 类型 | 描述 |
| --- | --- | --- |
| date_time_offset | const DateTimeOffset\& | 日期和时间。 |

### ReturnValue

时区之间的时间差。

## 另见

* Class [TimeSpan](../../timespan/)
* Class [DateTimeOffset](../../datetimeoffset/)
* Class [TimeZoneInfo](../)
* Namespace [System](../../)
* Library [Aspose.Font for C++](../../../)
## TimeZoneInfo::GetUtcOffset(DateTime) const method


计算指定日期和时间在此时区与 UTC 时区之间的时间差。

```cpp
TimeSpan System::TimeZoneInfo::GetUtcOffset(DateTime date_time) const
```


| 参数 | 类型 | 描述 |
| --- | --- | --- |
| date_time | DateTime | 日期和时间。 |

### ReturnValue

时区之间的时间差。

## 另见

* Class [TimeSpan](../../timespan/)
* Class [DateTime](../../datetime/)
* Class [TimeZoneInfo](../)
* Namespace [System](../../)
* Library [Aspose.Font for C++](../../../)
