1 Answer
- Newest
- Most votes
- Most comments
1
Hi Niles!
Here's how you can get the current epoch, in seconds and milliseconds:
const epoch = new Date('1970-01-01T00:00:00Z'); const currentDate = new Date(); const timestamp_ms = currentDate - epoch; const timestamp = Math.floor(timestamp_ms / 1000); GameSparks().Logging().Info("Current timestamp, in seconds: " + timestamp);
answered a year ago
Relevant content
- asked 3 years ago
- asked 2 years ago
- Accepted Answerasked 9 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 7 months ago
Thanks a lot, Joris, It worked now!