Our codes are done on C#. However, I use javascript for e2e tests.
For a particular variable, it is based on DateTime.UtcNow.Ticks
. It used to be based on DateTime.UtcNow
My previous js script just simply use the following declaration:
const date = new Date();
const dateNow = date.toISOString();
This is based on a suggested solution in this thread: How do I get a UTC Timestamp in JavaScript?
I need the dateNow on a string format based on UTC Ticks.