---
title: UtcOffset
summary: An offset from UTC.
url: https://www.fastly.com/documentation/reference/compute/sdks/cpp/fastly/geo/class.UtcOffset/
---

**Kind:** Class  
**Module:** [geo](https://www.fastly.com/documentation/reference/compute/sdks/cpp/fastly/geo/)  
**Package:** compute-sdk-cpp 0.7.0  
**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/geo.h#L42

Include `fastly/geo.h` to use this class.

An offset from UTC.

This class can store values up to ±25:59:59.

## Methods

### is_negative

**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/geo.h#L73

```cpp
bool fastly::geo::UtcOffset::is_negative()
```

Check if the offset is negative, or west of UTC.

**Returns**

`bool`

### is_positive

**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/geo.h#L70

```cpp
bool fastly::geo::UtcOffset::is_positive()
```

Check if the offset is positive, or east of UTC.

**Returns**

`bool`

### is_utc

**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/geo.h#L67

```cpp
bool fastly::geo::UtcOffset::is_utc()
```

Check if the offset is exactly UTC.

**Returns**

`bool`

### minutes_past_hour

**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/geo.h#L56

```cpp
int8_t fastly::geo::UtcOffset::minutes_past_hour()
```

Obtain the number of minutes past the hour the offset is from UTC. A positive value indicates an offset to the east; a negative to the west.

**Returns**

`int8_t`

### seconds_past_minute

**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/geo.h#L64

```cpp
int8_t fastly::geo::UtcOffset::seconds_past_minute()
```

Obtain the number of seconds past the minute the offset is from UTC. A positive value indicates an offset to the east; a negative to the west.

**Returns**

`int8_t`

### whole_hours

**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/geo.h#L48

```cpp
int8_t fastly::geo::UtcOffset::whole_hours()
```

Obtain the number of whole hours the offset is from UTC. A positive value indicates an offset to the east; a negative to the west.

**Returns**

`int8_t`

### whole_minutes

**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/geo.h#L52

```cpp
int16_t fastly::geo::UtcOffset::whole_minutes()
```

Obtain the number of whole minutes the offset is from UTC. A positive value indicates an offset to the east; a negative to the west.

**Returns**

`int16_t`

### whole_seconds

**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/geo.h#L60

```cpp
int32_t fastly::geo::UtcOffset::whole_seconds()
```

Obtain the number of whole seconds the offset is from UTC. A positive value indicates an offset to the east; a negative to the west.

**Returns**

`int32_t`
