mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2004
Posts: 243
G
gomp Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Jun 2004
Posts: 243
When I type: /time .. I get: Thursday February 7 2008 -- 10:24:00 +01:00 .. in status!

When I type: /say $fulldate .. I get: Thu Feb 07 10:24:00 2008 .. in the channel I type it in.

I wonder how could I change the time stamp format? Both of them..

I would like "/time" to give: Thursday 07 February 2008 -- 10:24:00 GMT +01:00

And I would like the "/say $fulldate" to give: Thursday 07 February 2008 - 10:24:00

Anyone know where to find this?
I know how to manage timestamps, but I cannot find where to manage them.


I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
Joined: Dec 2002
Posts: 503
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
/time and $fulldate are fixed formats. If you want to play around with the format of a time string, look at $asctime(), i.e.:

Code:
//echo -a $asctime(dddd dd mmmm yyyy -- HH:nn:ss zzz)

See /help $asctime() for the formatting details.

Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
/time is returned in a format chosen by the server. You can catch the response with a raw 391 event.

Joined: Dec 2002
Posts: 503
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
Ack! Was thinking $time! smile

Joined: Jun 2004
Posts: 243
G
gomp Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Jun 2004
Posts: 243
So it is not possible to mess with?

I got confused now..


I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
You can't change the output of $fulltime. You can display time in a custom format using $asctime as Bekar described.

/time is returned by the IRC server, you can change the display locally using a raw 391 event.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
alias mytime { return $time(dddd dd mmm yyyy -- hh:nn:tt zzz) }
alias myfulldate { return $time(dddd dd mmm yyyy -- hh:nn:tt) }

//say $mytime
//say $myfulldate

Obviously you can rename those to something better. If you want $mytime to work as an alias, change "return" to /say and add a check to make sure that the $active window is either a channel or a query.


Invision Support
#Invision on irc.irchighway.net
Joined: Jun 2004
Posts: 243
G
gomp Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Jun 2004
Posts: 243
Thanks a lot! laugh


I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.

Link Copied to Clipboard