Type/to search
Built-in Functions
Global
Version
IsVirtual
GetOS
GetPid
GetMeta
Sleep
Unix
UnixNano
_D
GetCommand
GetLastError
SetErrorFilter
_N
_C
_Cross
JSON.parse
JSON.stringify
Encode
MD5
UUID
Log
Market
Trade
Account
Futures
Exchange
IO
Network
Storage
Threads
TA
Talib
OS
Structures
Built-in Variables and Constants
Conventions
Exchanges

Get the second-level timestamp of the current moment.

Unix()

Examples

Get the current timestamp in seconds.

javascript
function main() { var t = Unix() Log(t) // Output: 1728632400 (timestamp in seconds, a 10-digit integer) }
python
def main(): t = Unix() Log(t) # Output: 1728632400 (timestamp in seconds, a 10-digit integer)
rust
fn main() { let t = Unix(); Log!(t); // Output: 1728632400 (timestamp in seconds, a 10-digit integer) }

Returns

TypeDescription

number

Returns the second-level timestamp.

See Also