# DateTime

{% hint style="info" %}
This class is part of an [Early Access](https://github.com/sentiance/v4-docs/blob/main/sdk/api-reference/android/usercontext/broken-reference/README.md) feature, and is subject to change in the future.
{% endhint %}

A date-time with a time-zone in the ISO-8601 calendar system.

## DateTime API

|          |                                                              |
| -------- | ------------------------------------------------------------ |
| long     | [getEpochTime](#getepochtime) ()                             |
| String   | [getTimezoneId](#gettimezoneid) ()                           |
| int      | [getTimezoneOffsetInMinutes](#gettimezoneoffsetinminutes) () |
| Calendar | [toCalendar](#tocalendar) ()                                 |

### `getEpochTime()`

> ```java
> long getEpochTime()
> ```
>
> Returns the epoch time.

### `getTimezoneId()`

> ```java
> String getTimezoneId()
> ```
>
> Returns the timezone ID. See java.util.TimeZone.

### `getTimezoneOffsetInMinutes()`

> ```java
> int getTimezoneOffsetInMinutes()
> ```
>
> Returns the timezone offset in minutes.

### `toCalendar()`

> ```java
> Calendar toCalendar()
> ```
>
> Returns a Calendar representation of this object.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sentiance.com/important-topics/sdk/api-reference/android/datetime.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
