|
|
Joined: Mar 2005
Posts: 74
Babel fish
|
OP
Babel fish
Joined: Mar 2005
Posts: 74 |
Is it possible that i make a mirc clock? Like ppl say !time, the bot will show the time in US?
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
It's possible, but the first problem that you've got is determining just what time is going to be reported? The US alone has (I think) 5 time zones, so you can't report a single time for all of the US.
|
|
|
|
Joined: Mar 2005
Posts: 74
Babel fish
|
OP
Babel fish
Joined: Mar 2005
Posts: 74 |
American Central ? is that a zone? that's what my friend told me
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Central Time is a valid Time zone, for that time zone use on *:text:!time:*:{
var %msg = $iif($target == $chan,$chan,$nick)
.msg %msg The current time in the Central Time Zone is $calc($gmt - $duration(6:0:0) + $daylight)
}
|
|
|
|
Joined: Aug 2004
Posts: 44
Ameglian cow
|
Ameglian cow
Joined: Aug 2004
Posts: 44 |
Standard Time Zones in the US are Eastern-Central-Pacific But keep in mind that Eastern is 3 hours ahead of Pacific and 1 hour ahead of Central.
|
|
|
|
Joined: Mar 2005
Posts: 74
Babel fish
|
OP
Babel fish
Joined: Mar 2005
Posts: 74 |
The current time in the Central Time Zone is 1116405106
The bot shows me that. I don't under by the 111..
will the bot be able to say it like :-
< bot > It is now: Tuesday May 17 »»9:26:05 Gametime
|
|
|
|
Joined: Jun 2003
Posts: 994
Hoopy frood
|
Hoopy frood
Joined: Jun 2003
Posts: 994 |
Actually there are 5 in the continental US .. Eastern, Central, Mountain, Pacific, and Alaska (plus 2 off the continent, Aleutian and Hawaii (Hawaii is different only in the summer because they don't observe daylight savings time).
I refuse to engage in a battle of wits with an unarmed person.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
on *:text:!time:*:{
var %msg = $iif($target == $chan,$chan,$nick)
.msg %msg It is now $left($asctime($calc($gmt - $duration(6:0:0) + $daylight)),-5) Game Time
}
Try this updated code. Not sure how to generate the »» to place in the date/time display
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
I gave him code for the Central Time Zone because that was the time zone he asked for.
I'm in Canada, and we have 6 time zones.
|
|
|
|
Joined: Mar 2005
Posts: 74
Babel fish
|
OP
Babel fish
Joined: Mar 2005
Posts: 74 |
RusselB, the bot respons works fine for me but a little error.
01:06:30 am for us centrel
but my bot show's
< bot > It is now Wed May 18 17:06:02 Game Time
Alot of different from the real time
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Remove the + $daylight from the code
Not sure why it was giving that big a discrepancy, but when tested for my time zone (Eastern) it showed correct, with that missing, even though we are on Daylight savings time.
Maybe someone else can explain it.
|
|
|
|
Joined: Mar 2005
Posts: 74
Babel fish
|
OP
Babel fish
Joined: Mar 2005
Posts: 74 |
Thx! RusselB it works now
|
|
|
|
|
|