Get Current Time

Gets the current time for a given time zone.

This action is available in API version 65.0 and later.

Supported REST HTTP Methods

URI
/services/data/vXX.X/actions/standard/getCurrentTime
Formats
JSON, XML
HTTP Methods
POST
Authentication
Authorization: Bearer token

Inputs

Input Details
timeZone
Type
string
Description
Optional. The text representation of the time zone.

Outputs

Output Details
currentTime
Type
string
Description
The current time in the given time zone.

Example

Sample request body:

1{
2  "inputs" : [{
3    "timeZone" : "America/Los_Angeles"
4  }]
5}

Sample response body:

1{
2  "actionName" : "getCurrentTime",
3  "errors" : null,
4  "isSuccess" : true,
5  "outputValues" : {
6    "currentTime" : "2025-02-24 14:30:15"
7  }
8}