---
schema_version: "1"
id: 53303ef392d2d859153bcebfb4f4dec59ffe0af8a140d688415b70c522b66147
title: UTCToWallTime()
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/aura-platform/guides/aura/ref-jsapi/ref-jsapi-auralocalizationservice-utctowalltime.md
canonical_url: https://developer.salesforce.com/docs/platform/aura-platform/guide/ref-jsapi-auralocalizationservice-utctowalltime.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: d9c6364cdfc584f5f519ba0a5e0b21bf5c064ba4754d1cd4b2d6034f86d1f27c
products:
  - Lightning Aura Components Developer Guide
  - Platform Developer Content
---

# UTCToWallTime()

Converts a datetime from UTC to a specified timezone.

## Signature

`UTCToWallTime (Date date, String timezone, function callback)`

## Parameters

**_date_:** Type: `Date`. A JavaScript `Date` object.

**_timezone_:** Type: `String`. A time zone ID based on the `` class, for example, `"America/Los_Angeles"`.

**_callback_**

Type: `function`

A function to call after the conversion is done. Access the converted value in the first parameter of the callback.

## Sample Code

```javascript
var format = $A.get("$Locale.timeFormat");
format = format.replace(":ss", "");
var langLocale = $A.get("$Locale.langLocale");
var timezone = $A.get("$Locale.timezone");
var date = new Date();
$A.localizationService.UTCToWallTime(date, timezone, function(walltime) {
    // Returns the local time without the seconds, for example, 9:00 PM
    displayValue = $A.localizationService.formatDateTimeUTC(walltime, format, langLocale);
})
```

