is there a way to get a timestamp and store it in a variable?

It could be needed to record a log of some messages from an idler game I'm thinking about...
As the game would play itself alone I should achieve to create a log.txt archive and write lines to it with a format of: TIMESTAMP "game message"
which timestamp are you talking about? I know only a real timestap which has the date + time
from users pc, if you talk about other timestamp, than i dont know. but if you have multiple
and different message logs with different time, you need multiple variables as well.

the RL time I use currently keep counting up as well, but I dont know how to fix it
but there is a way if not used in parallel process which you can try out.

but can you explain a bit which timestamp?
control variable can pull "play time" from game data, that is the time that has elapsed since the game was started with "new game"
It could be needed to record a log of some messages from an idler game I'm thinking about...
As the game would play itself alone I should achieve to create a log.txt archive and write lines to it with a format of: TIMESTAMP "game message"
...If you want real time (according to the machine being used):
Spoiler: Date
To get Date:
Code:
new Date().toDateString()
Spoiler: Time
To get Time:
Code:
function getTime(){var d = new Date(); var h = d.getHours(), m = d.getMinutes(); var suffix = h >= 12 ? "PM":"AM"; h = ((h + 11) % 12 + 1); return h + ':' + m + ' ' + suffix;}; getTime()
Spoiler: Event Setup Screenshot
1589642419398.png
Spoiler: In-Game Screenshot
1589642660959.png


Spoiler: Message Backlog Plugin

...if you mean playtime like Andar mentioned above..
Spoiler
pull "play time" from game data, that is the time that has elapsed since the game was started with "new game"

Screenshot:
1589645415192.png

Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-to-get-a-timestamp-and-store-it-in-a-variable.121641/