Reading the manual page I linked on clock format, it should make it obvious you have no use for that string mapping, as the format used would already print the month in numbers.
Also, executing that code you posted once in globalspace will only result in $date holding the time for that particular moment, and not current date.
A proper example, you'll probably need to modify it to suite your needs:
Code: Select all
proc addvoicedb {nick host hand chan args} {
global mysqlink UCSRegistered
set username [UCS:Registered:IsRegistered $nick]
set hostmask "*!*@[lindex [split $host @] 1]"
mysqlexec $mysqlink "INSERT INTO voice (nick,username,chan,host,ajouté_le) VALUES ('$nick','$username','$chan','$hostmask',NOW())"
}
Or
Code: Select all
proc addvoicedb {nick host hand chan args} {
global mysqlink UCSRegistered
set username [UCS:Registered:IsRegistered $nick]
set hostmask "*!*@[lindex [split $host @] 1]"
mysqlexec $mysqlink "INSERT INTO voice (nick,username,chan,host,ajouté_le) VALUES ('$nick','$username','$chan','$hostmask','[clock [clock seconds] -format "%Y.%m.%d"]')"
}