Name
DateToUTC -- convert local date to UTC (V7.1)
Synopsis
u$ = DateToUTC(d$[, isdst])
Function
This function can be used to convert the local date passed in d$ to a UTC date. The d$ parameter must be in Hollywood's standard date format, i.e. dd-mmm-yyyy hh:mm:ss. See CompareDates for details.

The optional argument isdst specifies whether or not daylight saving time is active at the specified date. Normally, you don't have to specify this argument because Hollywood will automatically query this information from the timezone database. It is only necessary to pass this information in case the specified time is ambiguous, i.e. when switching from daylight saving time back to standard time, a certain period of time (typically an hour) is repeated in the night. In Germany, for example, clocks are set back from 3am to 2am when switching from daylight saving time to standard time. This means that the hour between 2am and 3am happens twice: Once in daylight saving time, once in standard time. The isdst argument allows you to specify which hour you are referring to.

To convert a UTC date back into a local date, use the UTCToDate() function. See UTCToDate for details.

Inputs
d$
local date to convert to UTC date
isdst
optional: whether or not daylight saving time is active at the specified date (defaults to -1 which means that this information should be retrieved from the local timezone database)
Results
u$
UTC equivalent of the local date argument

Show TOC