Is there a .now() from the DB server time, possibility when creating a document on maybe an attribute (created_at) ?
Getting this from client is not reliable.
Spinning a cloud function for this is not ok.
The underlying mysql DB has this option build in, just wanted to know if it can be used.
Summary
The user is asking if it is possible to sort documents in the Console. They mention that although it is not currently possible to sort in the Console, sorting can be done with the `listDocuments` function. They also found information on GitHub, but not in the official documentation. The user asks if there is a possibility of using the `$createdAt` and `$updatedAt` parameters to sort documents in the console. They also want to know if there is a way to access the DB server time, such as using `.now()` when creating a document. The user mentions that getting the timestamp from the client is not reliable and using a cloud function
ideclon
Nov 26, 2023, 16:04
Every Document has a $createdAt and $updatedAt parameter
Victor1337
Rank 1: Thread
Nov 26, 2023, 16:13
Did eventually found this. But this is not available to sort elements into the console (admin) right ?
Victor1337
Rank 1: Thread
Nov 26, 2023, 16:14
Also could not really find the 2 in the docs. 👀
Victor1337
Rank 1: Thread
Nov 26, 2023, 16:14
Found them on GitHub
ideclon
Nov 26, 2023, 16:15
You can’t currently sort in the Console, but you can have it sorted with listDocuments