Make worldtime2text accept timestamp (if null set to default world.time).

This commit is contained in:
eswordthecat
2015-03-22 23:27:42 +08:00
parent 94ff538c9b
commit a1526c01ef

View File

@@ -4,8 +4,8 @@
#define HOURS * 36000
//Returns the world time in english
proc/worldtime2text()
return "[round(world.time / 36000)+12]:[(world.time / 600 % 60) < 10 ? add_zero(world.time / 600 % 60, 1) : world.time / 600 % 60]"
proc/worldtime2text(timestamp = world.time)
return "[round(timestamp / 36000) + 12] : [(timestamp / 600 % 60) < 10 ? add_zero(timestamp / 600 % 60, 1) : timestamp / 600 % 60]"
proc/time_stamp()
return time2text(world.timeofday, "hh:mm:ss")