Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
nazradin
Apprentice


Joined: 23 Mar 2003
Posts: 114
Location: New Zealand

PostPosted: Wed Jul 09, 2003 6:09 pm   

clock display
 
is there anyway to use my current clock in the form of a button

%time(h:nn am/pm) and change it so that it reflects time in another time zone

for instance take off 11 hours so that it displays US east coast time instead of the current time in japan which my computer clock is set?

Nazradin
Reply with quote
Amfitrion
Wanderer


Joined: 29 Sep 2001
Posts: 75
Location: Israel

PostPosted: Wed Jul 09, 2003 9:36 pm   
 
#BUTTON {%abs(%eval(%time(hh) + 11 - 24)):%time(nn:ss)} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} "" {Explore|Inset} {} {}
Reply with quote
nazradin
Apprentice


Joined: 23 Mar 2003
Posts: 114
Location: New Zealand

PostPosted: Fri Jul 11, 2003 7:29 pm   
 
quote:
Originally posted by Amfitrion

#BUTTON {%abs(%eval(%time(hh) + 11 - 24)):%time(nn:ss)} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} "" {Explore|Inset} {} {}




this works some times but not others

for instance,12 midnight becomes 1 in the afternoon, but 3.10am is 10.10am

nazradin
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri Jul 11, 2003 7:45 pm   
 
%mod( (%time( hh) + 11), 24)

This can also be done with the backslash, but it doesn't seem to show up on the forum. It would come between ) and 24.
(%time( hh) + 11)24
Reply with quote
nazradin
Apprentice


Joined: 23 Mar 2003
Posts: 114
Location: New Zealand

PostPosted: Sun Jul 13, 2003 5:20 am   
 
quote:
Originally posted by LightBulb

%mod( (%time( hh) + 11), 24)

This can also be done with the backslash, but it doesn't seem to show up on the forum. It would come between ) and 24.
(%time( hh) + 11)24



this also has the same problem, some hours its translates correctly , some it doesnt

nazradin
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sun Jul 13, 2003 1:04 pm   
 
Don't forget the %eval. %time returns a string, so assuming the current time is 7AM, if you do:
%mod(%time(hh) + 11, 24)

it ends up like:
%mod("07" + 11, 24)

which then becomes:
%mod("711", 24)

which results in:
15

With the %eval you have:
%mod(%eval(%time(hh) + 11), 24)

which ends up like:
%mod(18, 24)

and gives the correct result of:
18
Reply with quote
nazradin
Apprentice


Joined: 23 Mar 2003
Posts: 114
Location: New Zealand

PostPosted: Mon Jul 14, 2003 7:55 am   
 
quote:
Originally posted by Kjata

Don't forget the %eval. %time returns a string, so assuming the current time is 7AM, if you do:
%mod(%time(hh) + 11, 24)

it ends up like:
%mod("07" + 11, 24)

which then becomes:
%mod("711", 24)

which results in:
15

With the %eval you have:
%mod(%eval(%time(hh) + 11), 24)

which ends up like:
%mod(18, 24)


thanks working perfect now

nazradin

and gives the correct result of:
18

Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net