TimeNow
Returns the current local time in a particular time zone.
Syntax
TimeNow([ <value> [, <ignore_daylight_saving> ]])
Parameters
<value>
Type: None
(Optional.) Long or Text value specifying local time zone to use.
<ignore_daylight_saving>
Type: Boolean
(Optional.) Whether to ignore adjustments for daylight-saving time. The default value is False.
(return)
Type: Date
The current local time in the time zone.
Notes
The return value is the current local time in the time zone, with the date set to 30 December 1899.
If <value> is a Long value, it is the index value of a time zone defined in the registry on the server, or -1 to specify UTC time.
If <value> is a Text value, it is the name of a time zone defined in the registry on the server, or “UTC” to specify UTC time.
If
<value> is omitted, NULL or empty, the time zone associated with the program in which the function is called is used. By default, the program's time zone is the local time zone of the server, but this can be changed by calling
SetTimeZone.
If <value> is any other type, an error occurs.
If the time zone specified by <value> is not in the registry, an error occurs (thus this function can be used to determine whether a specific value represents a valid time zone).
Example
This example returns the current local time for the program's time zone:
TimeNow()
See also