Converts a datetime from UTC to the local time zone. 

LocalDatetime = SRP_DateTime("FromUTC", Datetime)

Returns

A datetime in OI's internal format.

Parameters

ParameterDescription
TimeA datetime in OI's internal format. (REQUIRED)

Remarks

The "FromUTC" service converts the given datetime–assumed to be in the UTC time zone–into the local time zone. It handles edge cases, so if the UTC datetime is 1/18/2020 at 6am and the local time zone is Pacific Standard Time, it will return 1/17/2020 at 10pm.

Examples

// Parse a UTC datetime, perhaps received via the web, and convert it to local datetime
Datetime = SRP_DateTime("Parse", "Tue, 31 Dec 2019 14:12:05 GMT", "DDD, M MMM YYYY hh:mm:ss")
LocalDatetime = SRP_DateTime("FromUTC", Datetime)
  • No labels