CurrentTime

Description:              This function returns the number of seconds, in local or UTC time, since midnight of January 1, 1970 (where "midnight" is 00:00).

Returns:                    Numeric (double)

Usage:                       Script

Format:                      CurrentTime([TimeType] )

Parameters:             TimeType    { numeric }  { optional }  { default: 0 }

                                                Any expression that evaluates to a 0 or 1. When 0, it indicates that time returned should be local time.  If set to 1, indicates that the current UTC time should be returned.

Comments:               This function solves the problem encountered when using Seconds together with Today to determine the current date and time, when the time is within a fraction of a second of midnight.

                             This function assumes that "midnight" on January 1, 1970 is 00:00, rather than 24:00 on a 24-hour clock.

Example:

If ! Valid(RightNow);

[

  RightNow = CurrentTime(); 

]

This assigns the current time in seconds since midnight on January 1, 1970 to the double variable rightNow.

See Also:

Now | Seconds | Today