This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Local date/time

Old posts that have not been replied to for several years.
Locked
[
[Nero]
Voice
Posts: 29
Joined: Mon May 27, 2002 8:00 pm

Local date/time

Post by [Nero] »

Hi Again
I have an old script that uses ...

set LOCALDATE [date]
set LOCALTIME [time]
set curdate [datetime]

These dont seem to work, is there other commands now that do the same job ??

Thanx
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

Code: Select all

#returns 29.04.03 
set LOCALDATE [clock format [clock seconds] -format "%d.%m.%y"]
#returns 14.12.34
set LOCALTIME [clock format [clock seconds] -format "%T"]
take a look at the clock command in the tcl-manual if you want a different output
Elen sila lúmenn' omentielvo
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

These commands used to be provided in eggdrop, but are no longer (except datetime, which never existed).

They can still be used, so long as compat.tcl is loaded.
Locked