---
schema_version: "1"
id: 12596b971c635e608cb5a79be896d791af4fc6d8a9f6168c905e74db31b450d2
title: WallTimeToUTC
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-walltimetoutc.md
canonical_url: https://developer.salesforce.com/docs/platform/aura-platform/guide/ref-jsapi-auralocalizationservice-walltimetoutc.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 8c45094ce505e0b20d41e71c0c92fd71301ed0b8b39e79aa897ffc68f746ed21
products:
  - Lightning Aura Components Developer Guide
  - Platform Developer Content
---

# WallTimeToUTC

Converts a datetime from a specified timezone to UTC.

## Signature

`WallTimeToUTC (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.

