Example 1
ConvertToUtc(Now(),"America/Chicago")
Will result in 09/25/2026 14:30:00 (UTC) when called on September 25 2026 at 09:30 (UTC -5 during daylight saving)
Converts the provided DateTime to UTC using the provided Time Zone Identifier.
ConvertToUtc(Date, Time Zone ID, [Assume Adjusted Time])
Where:
Date is the date to convert.
Time Zone ID is the time zone identifier to convert the DateTime to.
This is the IANA Zone ID of the time zone (see Noda Time | Time Zones).
Assume Adjusted Time (optional) If true, will assume entered time is adjusted; If false (default if not set), will assume standard time.
Assume Adjusted Time is used to handle ambiguous times, for example daylight saving time which occur twice a year (the first occurrence to introduce summer time, the second to revert to standard time).
By default (or FALSE) DriveWorks will assume that the time is given after the time has reverted (the second occurrence), set to TRUE to specify that the time is actually the adjusted (summer time) time before the clocks go back (ie. one hour earlier, standard time).
ConvertToUtc(Now(),"America/Chicago")
Will result in 09/25/2026 14:30:00 (UTC) when called on September 25 2026 at 09:30 (UTC -5 during daylight saving)
To obtain the Time Zone ID from a selected row of time zones in a Data Table control.
ConvertToUtc(Now(),TableGetValue(GetTimeZones(),1,TimeZoneTableReturn))
Will result in 09/25/2026 04:30:00 (UTC) when called on September 25 2026 at 09:30 (UTC -5)
Example data from the GetTimeZones() function, and presented in a Data Table control named TimeZoneTable.
The selected row from the TimeZoneTable control results in the value America/Chicago (column 1) being returned to the TableGetValue function.
| ID | Display Name | Offset |
| America/Cancun | Eastern Standard Time (Mexico) | -05:00 |
| America/Chicago | Central Standard Time | -05:00 |
|---|---|---|
| America/Indiana/Knox | Central Standard Time | -05:00 |
| America/Winnipeg | Central Standard Time | -05:00 |
| Canada/Central | Central Standard Time | -05:00 |
| US/Central | Central Standard Time | -05:00 |