ToUniversalTime

Typehandler
Dictionarylibrary.timezone
LibraryTime zone Library
Syntax
ToUniversalTime(<pSeconds>,<pTimeZone>)
Associationscom.livecode.library.timezone
Summary

Convert local time to universal time

Platformsmobile, desktop
Parameters
NameTypeDescription
pSeconds

The local time

pTimeZone

The time zone, in the form returned by the TimeZones function.

Example
local tDateTime
put "2018,2,14,13,38,0,4" into tDateTime
convert tDateTime to seconds
put ToUniversalTime(tDateTime, "Africa/Windhoek") into tDateTime
convert tDateTime to dateitems
-- tDateTime contains "2018,2,14,11,38,0,4"
Values
NameTypeDescription
return

The universal time

RelatedHandler: TimeZones
Description

Use the ToUniversalTime function to find the universal time, given the local time for the specified time zone.

Tagsdatetime,library