Question
· Aug 31, 2022

Is there a simplier way to get posix time with fractional seconds?

Currently what I have is:

set now = $now()
set ts = $zdt(now,-2) _ "." _ $p(now, ".", 2)

Docs state (for -2 dformat):

Fractional seconds in the input value are permitted, but ignored.
 
I wonder if there's some other way to get posix time with fractional seconds?
Discussion (4)2
Log in or sign up to continue

Except that calling Python is about 10x slower, a

Not really, more like faster if you need to call it more than once:

 
Code

Results in:

 
Output