You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Converts a time from UTC to the local time zone. 

LocalTime = SRP_Time("FromUTC", Time)

Returns

A time in OI's internal format.

Parameters

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

Remarks

The "FromUTC" service returns converts the given time–assumed to be in the UTC time zone–into the local time zone. It handles edge cases, so if the UTC time is 6am and the local time zone is Pacific Standard Time, it will return 10pm. If you want the current time in UTC, it's simpler to use the Now service. This service is useful for converting pre-existing dates.

Examples

// Parse a UTC time, perhaps received via the web, and convert it to local time
Time = SRP_Time("Parse", "14:12:05 GMT", "hh:mm:ss")
LocalTime = SRP_Time("FromUTC", Time)
  • No labels