.......thanks again for the links but it was a little to complex for me or probaly I didn't understand it.
I went for this script (see below) and I figured out how to change it to special caracters i.e. russian or greek or whatever for the weekdays and month.
The script needed to be opened in Notepad and then saved as UTF-8 with the special caraters and then it worked.
The time zone values are:
System Time & Date
PHP Code:
function tS(){ x=new Date(); x.setTime(x.getTime()); return x; }
UTC
PHP Code:
function tS(){ x=new Date(tN().getUTCFullYear(),tN().getUTCMonth(),tN().getUTCDate(),tN().getUTCHours(),tN().getUTCMinutes(),tN().getUTCSeconds()); x.setTime(x.getTime()); return x; }
GMT-1
PHP Code:
function tS(){ x=new Date(tN().getUTCFullYear(),tN().getUTCMonth(),tN().getUTCDate(),tN().getUTCHours(),tN().getUTCMinutes(),tN().getUTCSeconds()); x.setTime(x.getTime()-3600000); return x; }
GMT
PHP Code:
function tS(){ x=new Date(tN().getUTCFullYear(),tN().getUTCMonth(),tN().getUTCDate(),tN().getUTCHours(),tN().getUTCMinutes(),tN().getUTCSeconds()); x.setTime(x.getTime()+0); return x; }
GMT+1
PHP Code:
function tS(){ x=new Date(tN().getUTCFullYear(),tN().getUTCMonth(),tN().getUTCDate(),tN().getUTCHours(),tN().getUTCMinutes(),tN().getUTCSeconds()); x.setTime(x.getTime()+3600000); return x; }
GMT+2
PHP Code:
function tS(){ x=new Date(tN().getUTCFullYear(),tN().getUTCMonth(),tN().getUTCDate(),tN().getUTCHours(),tN().getUTCMinutes(),tN().getUTCSeconds()); x.setTime(x.getTime()+7200000); return x; }
And so on - (3600000 intervals for each hour + or -).
Call the script where you want it to appear with:
PHP Code:
<script type="text/javaScript">dT();</script>
Also put a link in the HTML head for the js file:
PHP Code:
<script type="text/javaScript" src="date_time_script.js"></script>
PHP Code:
function tS(){ x=new Date(tN().getUTCFullYear(),tN().getUTCMonth(),tN().getUTCDate(),tN().getUTCHours(),tN().getUTCMinutes(),tN().getUTCSeconds()); x.setTime(x.getTime()+10800000); return x; }
function tN(){ return new Date(); }
function lZ(x){ return (x>9)?x:'0'+x; }
function dE(x){ if(x==1||x==21||x==31){ return 'st'; } if(x==2||x==22){ return 'nd'; } if(x==3||x==23){ return 'rd'; } return 'th'; }
function dT(){ if(fr==0){ fr=1; document.write('<font size=2 font color=#000000 face=Verdana><b><span id="tP">'+eval(oT)+'</span></b></font>'); } document.getElementById('tP').innerHTML=eval(oT); setTimeout('dT()',1000); }
function y4(x){ return (x<500)?x+1900:x; }
var dN=new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'),mN=new Array('January','February','March','April','May','June','July','August','September','October','November','December'),fr=0,oT="dN[tS().getDay()]+','+' '+mN[tS().getMonth()]+' '+tS().getDate()+dE(tS().getDate())+' '+y4(tS().getYear())+' '+'-'+' '+lZ(tS().getHours())+':'+lZ(tS().getMinutes())+':'+lZ(tS().getSeconds())+' '";
No PHP server required and maybe some of you guys have use for this script as well.
P.S
What I didn't figure out yet is how to change the font size into px values.
Cheers.......
Bookmarks