> This page location: Date Functions > LOCALTIME
> Full Neon documentation index: https://neon.com/docs/llms.txt

# PostgreSQL LOCALTIME Function

**Info:** The LOCALTIME function behavior covered here is standard PostgreSQL and works the same whether you're running Postgres yourself or on any managed service. If you're an enterprise looking for managed Postgres built for the AI era, [Lakebase](https://www.databricks.com/product/lakebase) delivers performance, security, and native integration with the Lakehouse. If you're a developer or startup who needs to ship and scale quickly, [Neon](https://neon.com) gives you the fastest path from idea to production on Postgres.

**Summary**: in this tutorial, you will learn how to use the PostgreSQL `LOCALTIME` function to return the current time at which the current transaction starts.

## Introduction to PostgreSQL LOCALTIME function

The `LOCALTIME()` function returns the current time at which the current transaction starts.

Here's the basic syntax of the `LOCALTIME` function:

```sql
LOCALTIME(precision)
```

The `LOCALTIME` function takes one optional argument:

**1) `precision`**

The `precision` argument specifies fractional seconds precision of the second field.

If you omit the `precision` argument, it defaults to 6.

The `LOCALTIME` function returns a [`TIME`](../postgresql-tutorial/postgresql-time) value that represents the time at which the current transaction starts.

Note that the `LOCATIME` function returns a `TIME` without time zone whereas the [`CURRENT_TIME`](https://neon.com/postgresql/date-functions/postgresql-current_time) function returns a `TIME` with the timezone.

## PostgreSQL LOCALTIME function examples

Let's take some examples of using the `LOCALTIME` function.

### 1) Basic PostgreSQL LOCALTIME function example

The following example uses the `LOCALTIME` function to get the time of the current transaction:

```sql
SELECT LOCALTIME;
```

Output:

```
    localtime
-----------------
 16:37:59.950622
(1 row)

```

### 2) Using the PostgreSQL LOCALTIME function with fractional seconds precision

The following example uses the `LOCALTIME(2)` function to get the time with a specified fractional seconds precision:

```sql
SELECT LOCALTIME(2);
```

Output:

```
  localtime
-------------
 16:38:07.97
(1 row)
```

## Summary

- Use the PostgreSQL `LOCALTIME` function to get the time at which the current transaction starts.

---

## Related docs (Date Functions)

- [AGE](https://neon.com/postgresql/date-functions/age)
- [AT TIME ZONE Operator](https://neon.com/postgresql/date-functions/at-time-zone)
- [CLOCK_TIMESTAMP](https://neon.com/postgresql/date-functions/clock_timestamp)
- [CURRENT_DATE](https://neon.com/postgresql/date-functions/current_date)
- [CURRENT_TIME](https://neon.com/postgresql/date-functions/current_time)
- [CURRENT_TIMESTAMP](https://neon.com/postgresql/date-functions/current_timestamp)
- [DATE_PART](https://neon.com/postgresql/date-functions/date_part)
- [DATE_TRUNC](https://neon.com/postgresql/date-functions/date_trunc)
- [EXTRACT](https://neon.com/postgresql/date-functions/extract)
- [ISFINITE](https://neon.com/postgresql/date-functions/isfinite)
- [JUSTIFY_DAYS](https://neon.com/postgresql/date-functions/justify_days)
- [JUSTIFY_HOURS](https://neon.com/postgresql/date-functions/justify_hours)
- [JUSTIFY_INTERVAL](https://neon.com/postgresql/date-functions/justify_interval)
- [LOCALTIMESTAMP](https://neon.com/postgresql/date-functions/localtimestamp)
- [MAKE_DATE](https://neon.com/postgresql/date-functions/make_date)
- [MAKE_INTERVAL](https://neon.com/postgresql/date-functions/make_interval)
- [MAKE_TIME](https://neon.com/postgresql/date-functions/make_time)
- [NOW](https://neon.com/postgresql/date-functions/now)
- [PG_SLEEP](https://neon.com/postgresql/date-functions/pg_sleep)
- [STATEMENT_TIMESTAMP](https://neon.com/postgresql/date-functions/statement_timestamp)
- [TIMEOFDAY](https://neon.com/postgresql/date-functions/timeofday)
- [TO_DATE](https://neon.com/postgresql/date-functions/to_date)
- [TO_TIMESTAMP](https://neon.com/postgresql/date-functions/to_timestamp)
