How do I get current timestamp in seconds?
问题 In Dyalog APL I can use the function ⎕TS to get the current year, month, day, hour, minute, second etc, but is there a way to get the current timestamp in seconds from e.g. 1970-01-01 (Unix timestamp)? 回答1: Using days from https://dfns.dyalog.com/n_days.htm )copy dfns days C:\Program Files\Dyalog\Dyalog APL-64 17.1 Unicode\ws\dfns.dws saved Wed Aug 21 19:40:24 2019 86400×(days ⎕TS)-(days 1970 1 1) 1570618030 Could also use the over ⍥ operator, coming in Dyalog version 18.0 )copy dfns days C: