ID:157380
 
How would I find the server time before every time the world.log is written to? I have some code now:
var/logtime = time2text(world.timeofday,"DD Month YYYY - hh:mm:ss")

and then when the log is written to:
mob
Admin
verb
Boot(mob/M in world)
set category = "Admin"
world << "<font color=blue><b>[M] was booted by [src]"
world.log << "[logtime] | [src.name] boots [M]."
del(M)

When I use this method, the log displays only the time the logtime var was created. This time is fixed.
Because logtime isn't to update unless you tell it to.
In response to Leur
So how would I tell it to update before the log entry is made?
In response to Tman1114
mob
Admin
verb
Boot(mob/M in world)
set category = "Admin"
logtime = time2text(world.timeofday,"DD Month YYYY - hh:mm:ss")
world << "<font color=blue><b>[M] was booted by [src]"
world.log << "[logtime] | [src.name] boots [M]."
del(M)

-removed my comment-
I need to pay more attention
In response to Leur
Thanks!

Month isn't a valid time stamp.

Actually, it is. Outputs full month name.
In response to Tman1114
I saw that right before you posted. I was like do'h.
In response to Leur
NP.

Anyways, thanks for your help.
In response to Tman1114
Leur wrote:
> mob
> Admin
> verb
> Boot(mob/M in world)
> set category = "Admin"
> logtime = time2text(world.timeofday,"DD Month YYYY - hh:mm:ss")
> world << "<font color=blue><b>[M] was booted by [src]"
> world.log << "[logtime] | [src.name] boots [M]."
> del(M)
>


as opposed to this, I use a function to call it, so if i decided to change the format (or time zone displayed in) it can be done without alot of editing.
proc/logtime()
return time2text(world.timeofday,"DD Month YYYY - hh:mm:ss")

> mob
> Admin
> verb
> Boot(mob/M in world)
> set category = "Admin"
> world << "<font color=blue><b>[M] was booted by [src]"
> world.log << "[logtime()] | [src.name] boots [M]."
> del(M)