Converts a time from the local time zone to UTC.
UtcTime = SRP_Time("ToUTC", Time)
Returns
A time in OI's internal format.
Parameters
Parameter | Description |
---|---|
Time | A time in OI's internal format. (REQUIRED) |
Remarks
The "ToUTC" service converts the given time–assumed to be in the local time zone–into the UTC time zone. It handles edge cases, so if the local time zone is Pacific Standard Time and the local time is 10pm, it will return 6am. If you want the current time in UTC, it's simpler to use the Now service. This service is more useful for converting pre-existing dates.
Examples
// Parse a local time, entered by the user, and convert it to UTC Time = SRP_Time("Parse", UserInput, "hh:mm:ss") UtcTime = SRP_Time("ToUTC", Time)