Why is time::EPOCH not returning in SurrealDB

44 Views Asked by At

I am attempting to get a current UNIX datetime and am getting a cryptic error code. Am I missing something?

I have SurrealDB 1.0.0 installed on my Mac and running on 127.0.0.1:8000. I run this query

RETURN time::EPOCH

and I get this error:

Parse error: Path is not a member of time at line 1 column 14
  |
1 | RETURN time::EPOCH
  |             ^ 

Can someone please point me in the right direction on this?

1

There are 1 best solutions below

0
Alexander On

Thanks for sharing, we are looking into this, something seems to be broken there.

For now this will work:

return time::from::unix(time::unix())