mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2024
Posts: 2
M
Maiko Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
M
Joined: Mar 2024
Posts: 2
Hello .

I am trying to make a simple multi-zone time zone clock , that will display in a channel when requested with a !time command given in a channel .

Example : Bot The time here is 07:00:00
Bot The time ahead of here is 8:00:00

I have got one line to work ,but not the other .

on *:TEXT:!time:#:{
timer 1 1 msg $chan The Time here is $time(hh:nn:ss T)
timer 1 2 msg $chan The Time ahead of here is ( $calc ( $time + 60 ) )(hh:nn:ss T )
}




I am gonna to guess that it isn't that simple as just adding 60 , as in 60 minutes , to the $time .


I have tired to look for other timezone topic but not having alot of luck with their coding in the posts .

Thank you in advance .

Joined: May 2022
Posts: 5
A
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
A
Joined: May 2022
Posts: 5
Hello Maiko, im not quite sure what it is your asking for but i have this for you so far..

on *:TEXT:!world:#:{ worldtimes }

worldtimes {
echo -a 96 -----------------: Local Time: $asctime($ctime, HH:nn AM/PM) :-----------------
echo -a 13 --: Argentina (Buenos Aires): 8 $asctime($calc($ctime + (0 - 3*3600)), HH:nn tt) ; UTC offset: -3 hours
echo -a 13 --: Australia (Sydney): 8 $asctime($calc($ctime + (0 + 10*3600)), HH:nn tt) ; UTC offset: +10 hours
echo -a 13 --: Belgium (Brussels): 8 $asctime($calc($ctime + (0 + 2*3600)), HH:nn tt) ; UTC offset: +2 hours
echo -a 13 --: Brazil (Sao Paulo): 8 $asctime($calc($ctime + (0 - 3*3600)), HH:nn tt) ; UTC offset: -3 hours
echo -a 13 --: Canada (Toronto): 8 $asctime($calc($ctime + (0 - 4*3600)), HH:nn tt) ; UTC offset: -4 hours
echo -a 13 --: Chile (Santiago): 8 $asctime($calc($ctime + (0 - 4*3600)), HH:nn tt) ; UTC offset: -4 hours
echo -a 13 --: China (Beijing): 8 $asctime($calc($ctime + (0 + 8*3600)), HH:nn tt) ; UTC offset: +8 hours
echo -a 13 --: Denmark (Copenhagen): 8 $asctime($calc($ctime + (0 + 2*3600)), HH:nn tt) ; UTC offset: +2 hours
echo -a 13 --: Egypt (Cairo): 8 $asctime($calc($ctime + (0 + 2*3600)), HH:nn tt) ; UTC offset: +2 hours
echo -a 13 --: Finland (Helsinki): 8 $asctime($calc($ctime + (0 + 3*3600)), HH:nn tt) ; UTC offset: +3 hours
echo -a 13 --: France (Paris): 8 $asctime($calc($ctime + (0 + 2*3600)), HH:nn tt) ; UTC offset: +2 hours
echo -a 13 --: Germany (Berlin): 8 $asctime($calc($ctime + (0 + 2*3600)), HH:nn tt) ; UTC offset: +2 hours
echo -a 13 --: Greece (Athens): 8 $asctime($calc($ctime + (0 + 3*3600)), HH:nn tt) ; UTC offset: +3 hours
echo -a 13 --: India (New Delhi): 8 $asctime($calc($ctime + (0 + 5.5*3600)), HH:nn tt) ; UTC offset: +5.5 hours
echo -a 13 --: Indonesia (Jakarta): 8 $asctime($calc($ctime + (0 + 7*3600)), HH:nn tt) ; UTC offset: +7 hours
echo -a 13 --: Iran (Tehran): 8 $asctime($calc($ctime + (0 + 4.5*3600)), HH:nn tt) ; UTC offset: +4.5 hours
echo -a 13 --: Ireland (Dublin): 8 $asctime($calc($ctime + (0 + 1*3600)), HH:nn tt) ; UTC offset: +1 hour
echo -a 13 --: Israel (Jerusalem): 8 $asctime($calc($ctime + (0 + 3*3600)), HH:nn tt) ; UTC offset: +3 hours
echo -a 13 --: Italy (Rome): 8 $asctime($calc($ctime + (0 + 2*3600)), HH:nn tt) ; UTC offset: +2 hours
echo -a 13 --: Japan (Tokyo): 8 $asctime($calc($ctime + (0 + 9*3600)), HH:nn tt) ; UTC offset: +9 hours
echo -a 13 --: Mexico (Mexico City): 8 $asctime($calc($ctime + (0 - 5*3600)), HH:nn tt) ; UTC offset: -5 hours
echo -a 13 --: Netherlands (Amsterdam): 8 $asctime($calc($ctime + (0 + 2*3600)), HH:nn tt) ; UTC offset: +2 hours
echo -a 13 --: New Zealand (Wellington): 8 $asctime($calc($ctime + (0 + 12*3600)), HH:nn tt) ; UTC offset: +12 hours
echo -a 13 --: Norway (Oslo): 8 $asctime($calc($ctime + (0 + 2*3600)), HH:nn tt) ; UTC offset: +2 hours
echo -a 13 --: Philippines (Manila): 8 $asctime($calc($ctime + (0 + 8*3600)), HH:nn tt) ; UTC offset: +8 hours
echo -a 13 --: Poland (Warsaw): 8 $asctime($calc($ctime + (0 + 2*3600)), HH:nn tt) ; UTC offset: +2 hours
echo -a 13 --: Portugal (Lisbon): 8 $asctime($calc($ctime + (0 + 1*3600)), HH:nn tt) ; UTC offset: +1 hour
echo -a 13 --: Qatar (Doha): 8 $asctime($calc($ctime + (0 + 3*3600)), HH:nn tt) ; UTC offset: +3 hours
echo -a 13 --: Romania (Bucharest): 8 $asctime($calc($ctime + (0 + 3*3600)), HH:nn tt) ; UTC offset: +3 hours
echo -a 13 --: Russia (Moscow): 8 $asctime($calc($ctime + (0 + 3*3600)), HH:nn tt) ; UTC offset: +3 hours
echo -a 13 --: Saudi Arabia (Riyadh): 8 $asctime($calc($ctime + (0 + 3*3600)), HH:nn tt) ; UTC offset: +3 hours
echo -a 13 --: Singapore (Singapore): 8 $asctime($calc($ctime + (0 + 8*3600)), HH:nn tt) ; UTC offset: +8 hours
echo -a 13 --: South Africa (Johannesburg): 8 $asctime($calc($ctime + (0 + 2*3600)), HH:nn tt) ; UTC offset: +2 hours
echo -a 13 --: South Korea (Seoul): 8 $asctime($calc($ctime + (0 + 9*3600)), HH:nn tt) ; UTC offset: +9 hours
echo -a 13 --: Spain (Madrid): 8 $asctime($calc($ctime + (0 + 2*3600)), HH:nn tt) ; UTC offset: +2 hours
echo -a 13 --: Sweden (Stockholm): 8 $asctime($calc($ctime + (0 + 2*3600)), HH:nn tt) ; UTC offset: +2 hours
echo -a 13 --: Switzerland (Bern): 8 $asctime($calc($ctime + (0 + 2*3600)), HH:nn tt) ; UTC offset: +2 hours
echo -a 13 --: Thailand (Bangkok): 8 $asctime($calc($ctime + (0 + 7*3600)), HH:nn tt) ; UTC offset: +7 hours
echo -a 13 --: Turkey (Istanbul): 8 $asctime($calc($ctime + (0 + 3*3600)), HH:nn tt) ; UTC offset: +3 hours
echo -a 13 --: Turkey (Ankara): 8 $asctime($calc($ctime + (0 + 3*3600)), HH:nn tt) ; UTC offset: +3 hours
echo -a 13 --: United Arab Emirates (Abu Dhabi): 8 $asctime($calc($ctime + (0 + 4*3600)), HH:nn tt) ; UTC offset: +4 hours
echo -a 13 --: United Kingdom (London): 8 $asctime($calc($ctime + (0 + 1*3600)), HH:nn tt) ; UTC offset: +1 hour
echo -a 13 --: United States (Chicago): 8 $asctime($calc($ctime + (0 - 5*3600)), HH:nn tt) ; UTC offset: -5 hours
echo -a 13 --: United States (Los Angeles): 8 $asctime($calc($ctime + (0 - 7*3600)), HH:nn tt) ; UTC offset: -7 hours
echo -a 13 --: United States (New York): 8 $asctime($calc($ctime + (0 - 4*3600)), HH:nn tt) ; UTC offset: -4 hours
echo -a 13 --: Vietnam (Hanoi): 8 $asctime($calc($ctime + (0 + 7*3600)), HH:nn tt) ; UTC offset: +7 hours
}

OR

Or you could place this below in your alias in mIRC, Use !time
to echo all the times, If you want to message just 2 times you could do somthing like this..

on *:TEXT:!time:#:{
/msg # Argentina (Buenos Aires): $asctime($calc($ctime + (0 - 3*3600)), HH:nn tt) ; UTC offset: -3 hours
/msg # Local Time: $asctime($ctime, HH:nn AM/PM)
}

if you need anything more specific, ill try to help, thoe i havent really explained the code to you , i hope you can use somthing from this script smile


~ Ascertainment =)
Joined: Mar 2024
Posts: 2
M
Maiko Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
M
Joined: Mar 2024
Posts: 2
Thank you for replying .

What am I doing wrong in the $calc ? Too many spaces ? Not enough ?


Link Copied to Clipboard