Carpet

Carpet

2M Downloads

[suggestion] serverTime() Function

scuttstorm opened this issue ยท 4 comments

commented

Per Gnembon's suggestion in Discord I am making this bug tracker to suggest that a serverTime() function be added to return actual server time. This could be very useful for timekeeping even across server resets and outages.

commented

wait, isn't that world world_time is for?

commented

world_time() looks like it returns game server tick time, not real world time. For my purposes, I'm writing a script that keeps track of chest inventories players access over time, as well as a few other things. An administrative tool. It would mimic similar tools from Core Protect and the like, to monitor for theft in this case. Saving this data by date would be ideal.

commented

Yessir.

commented

so to summarize you want an actual time(), but instead of having a unreliable java nanotime, you want a universally acclaimed unix_time(), potentially with date() function to parse the date