| View previous topic :: View next topic |
| Author |
Message |
All0i5hu5
Joined: 04 Jan 2009 Posts: 13
|
Posted: Tue Feb 17, 2009 12:32 pm Post subject: #format time |
|
|
I noticed this change a few versions ago:
Changed the %t #format option to use a strftime format to create time stamps.
I used
#FORMAT {time} {%t}
#LINE {log} {yomomma.txt} {$time}
to timestamp when i opened a file with tail so I can keep a running log of tells on a given day.
Now when I do that... the numeral 0 gets written to the log.
If I:
#FORMAT {time} {%t}
#ECHO $time
I get #SYNTAX: #format {variable} {format} {arguments}.
Any ideas? Or how do I need to make this work now preferrably? |
|
| Back to top |
|
 |
Scandum Site Admin
Joined: 03 Dec 2004 Posts: 3274
|
Posted: Tue Feb 17, 2009 2:22 pm Post subject: |
|
|
You need to use the strftime format, see man strftime. The following should work:
| Code: |
#alias {logline}
{
#format time {%t} {{%Y-%m-%d %H:%M:%S}}
#line log mylog.txt {<178>$time \};
#line log mylog.txt %0
}
#act {%0 tells you '%1'} {logline}
|
|
|
| Back to top |
|
 |
moebius
Joined: 27 Jan 2005 Posts: 96
|
Posted: Tue Feb 17, 2009 7:15 pm Post subject: |
|
|
Why not make make it backwards compatible by using the old format by default if no format is specified for %t? _________________ StrangeMUD - strangemud.net:9332 |
|
| Back to top |
|
 |
Scandum Site Admin
Joined: 03 Dec 2004 Posts: 3274
|
Posted: Tue Feb 17, 2009 8:32 pm Post subject: |
|
|
| I'm trying to avoid feature bloat at all cost. |
|
| Back to top |
|
 |
|