mIRC Home    About    Download    Register    News    Help

Print Thread
Altering the time stamps ... #194587 07/02/08 09:32 AM
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.
Re: Altering the time stamps ... [Re: gomp] #194589 07/02/08 10:44 AM
Joined: Dec 2002
Posts: 503
B
Bekar Offline
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.

Re: Altering the time stamps ... [Re: gomp] #194590 07/02/08 10:45 AM
Joined: Dec 2002
Posts: 3,138
C
Collective Offline
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.

Re: Altering the time stamps ... [Re: Collective] #194591 07/02/08 10:47 AM
Joined: Dec 2002
Posts: 503
B
Bekar Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
Ack! Was thinking $time! smile

Re: Altering the time stamps ... [Re: Bekar] #194592 07/02/08 10:56 AM
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.
Re: Altering the time stamps ... [Re: gomp] #194593 07/02/08 12:16 PM
Joined: Dec 2002
Posts: 3,138
C
Collective Offline
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.

Re: Altering the time stamps ... [Re: gomp] #194597 07/02/08 02:21 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
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
Re: Altering the time stamps ... [Re: Riamus2] #195832 03/03/08 02:50 PM
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.