# localtime {#localtime}

**Parent topic:**[Functions](../../Functions/category.md)

## Syntax {#syntax}

`localtime(X)`

## Arguments {#arguments}

**X** is a variable/vector. The data type of *X* can be datetime, timestamp, or nanotimestamp.

## Details {#details}

Convert *X* in GMT \(Greenwich Mean Time\) to local time zone.

## Examples {#examples}

The following examples were conducted in US Eastern time zone.

```
localtime(2018.01.22T15:20:26);
// output: 2018.01.22T10:20:26

localtime(2017.12.16T18:30:10.001);
// output: 2017.12.16T13:30:10.001
```

