|
nazradin Apprentice
Joined: 23 Mar 2003 Posts: 114 Location: New Zealand
|
Posted: 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 |
|
|
|
Amfitrion Wanderer
Joined: 29 Sep 2001 Posts: 75 Location: Israel
|
Posted: Wed Jul 09, 2003 9:36 pm |
#BUTTON {%abs(%eval(%time(hh) + 11 - 24)):%time(nn:ss)} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} "" {Explore|Inset} {} {}
|
|
|
|
nazradin Apprentice
Joined: 23 Mar 2003 Posts: 114 Location: New Zealand
|
Posted: 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 |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: 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 |
|
|
|
nazradin Apprentice
Joined: 23 Mar 2003 Posts: 114 Location: New Zealand
|
Posted: 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 |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: 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 |
|
|
|
nazradin Apprentice
Joined: 23 Mar 2003 Posts: 114 Location: New Zealand
|
Posted: 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
|
|
|
|
|
|