1
Trepex
Ocean Net Theme Clock
  • 2004/11/21 16:50

  • Trepex

  • Just popping in

  • Posts: 19

  • Since: 2004/11/21


I have this weird bug in all of the Ocean Net themes that display (what I am assuming) is a clock in the upper right corner of the header. It is all garbled. Any idea what the problem is? Is it a language issue? I checked out the javascript code and the time stamp formatting seems pretty garbled too.

Here is a screenshot of what I mean, or check out my site to see what I mean.

2
tl
Re: Ocean Net Theme Clock
  • 2004/11/21 17:58

  • tl

  • Friend of XOOPS

  • Posts: 999

  • Since: 2002/6/23


You would have to set your charset to "EUC-JP" in order to see the clock runing properly.

You may want to try the following modification:

<Script Language="JavaScript">
<!--
var 
spSTim11="   ";
function 
time01() {
var 
dayTim,jiTim,funTim,byoTim,goze;
dayTim=new Date();
jiTim=dayTim.getHours();
funTim=dayTim.getMinutes();
byoTim=dayTim.getSeconds();
if (
jiTim<12goze="AM";
else {
goze="PM";
jiTim=jiTim-12;
}
document.time01.timeform.value=spSTim11+jiTim+":"+funTim+":"+byoTim+" "+goze;
setTimeout("time01()",1000);
}
// End -->
</Script>

3
LazyBadger
Re: Ocean Net Theme Clock

Well, no bugs really
Funny 12-hours clocks with (probably) japan or china text
You have to slightly modify javascript for your needs, as I done for my site
Meaningfull data is 3 variables (hours, minutes, seconds), which you can show as you want

My modified code (24 hours display, no unreadable garbage):

<Script Language="JavaScript">
<!--
var spSTim11=" Local Time ";
function time01() {
var dayTim,jiTim,funTim,byoTim,goze;
dayTim=new Date();
jiTim=dayTim.getHours();
funTim=dayTim.getMinutes();
byoTim=dayTim.getSeconds();
if (jiTim<12) goze="am ";
else {
goze="pm ";
//jiTim=jiTim-12;
}
document.time01.timeform.value=spSTim11+jiTim+":"+funTim+":"+byoTim;
setTimeout("time01()",1000);
}
// End -->

Work in action (with russian text for "Local Time") onhttp://mta.e-city.net.ru/

4
Trepex
Re: Ocean Net Theme Clock
  • 2004/11/23 13:32

  • Trepex

  • Just popping in

  • Posts: 19

  • Since: 2004/11/21


Got it! Thanks, both of you. I did find the script pretty easy to modify and actually made similar changes myself. What was confusing me was the formatting - namely trying to figure out what why the AM or PM part seemed to be appearing in an odd place, what the spSTIM11 variable was actually originally intended for (ie. "Local Time"), etc.

Anyway, thanks! I hadn't realized off-the-bat that the theme was coded by a chinese or japanese dev!

Login

Who's Online

173 user(s) are online (84 user(s) are browsing Support Forums)


Members: 0


Guests: 173


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits