Jump to content
xisto Community
Sign in to follow this  
gameratheart

Gamma Server's Time Is Two Months Behind!

Recommended Posts

I noticed a problem on my website a while ago, whereby a clock I'd put onto each page always seemed to put the date 2 months back. The clocks are run by an SSI script that takes the date and time information from the server itself. Of course, the first thing I did was check the script, and I did notice a few problems, in the script, but even after fixing it the date is still two months behind!I decided to do some investigation on this, and tried to see if I could find out what the server time on Gamma reportedly is. I finally found it when I looked at the php Info.Gamma Server's "Server Time" clock has somehow wound up two months behind, and is now claiming it is June instead of August. This is causing a few problems with my scripts, so if you're not too busy already, can you please look into fixing this for me?

Share this post


Link to post
Share on other sites

I am unaware of this issue, so I searched for server time display script.

<script type="text/javascript">

// Current Server Time script (SSI or PHP)- By JavaScriptKit.com (http://javascriptkit.com;
// For this and over 400+ free scripts, visit JavaScript Kit- [url=http://http://www.javascriptkit.com/;
// This notice must stay intact for use.

//Depending on whether your page supports SSI (.shtml) or PHP (.php), UNCOMMENT the line below your page supports and COMMENT the one it does not:
//Default is that SSI method is uncommented, and PHP is commented:

var currenttime = '<!--#config timefmt="%B %d, %Y %H:%M:%S"--><!--#echo var="DATE_LOCAL" -->' //SSI method of getting server date
//var currenttime = '<? print date("F d, Y H:i:s", time())?>' //PHP method of getting server date

///////////Stop editting here/////////////////////////////////

var montharray=new Array("January","February","March","April","May","June","July","August",
"September","October","November","December")
var serverdate=new Date(currenttime)

function padlength(what){
var output=(what.toString().length==1)? "0"+what : what
return output
}

function displaytime(){
serverdate.setSeconds(serverdate.getSeconds()+1)
var datestring=montharray[serverdate.getMonth()]+" "
+padlength(serverdate.getDate())+", "+serverdate.getFullYear()
var timestring=padlength(serverdate.getHours())+":"
+padlength(serverdate.getMinutes())+":"+padlength(serverdate.getSeconds())
document.getElementById("servertime").innerHTML=datestring+" "+timestring
}

window.onload=function(){
setInterval("displaytime()", 1000)
}

</script>

<p><b>Current Server Time:</b> <span id="servertime"></span></p>

<p style="font: normal 11px Arial">This free script provided by<br />
<a href="http://http://www.javascriptkit.com/ Kit</a></p>



If the above code is the right one to show the server time in SSI, the time displayed using above code shows the correct date and time in GMT+4 from EDT. Check the below link for script in action:

buffalohelp.net/servertime.shtml

I am also hosted with gamma server. Let me know how this goes.

Share this post


Link to post
Share on other sites

The script takes the time from the server itself, so it actually is using the time from wherever the website is based. It is supposed to therefore be in GMT, without any Daylight Saving Changes.But it isn't a problem with that script - it's a problem with gamma server itself. It's behind by two months, and I don't know how to change it.

Share this post


Link to post
Share on other sites

Please read the response I made carefully. The link provided shows in GMT time and date correctly. I was noting that it's GMT time from EDT +4 (GMT+4 from EDT). EDT is Eastern Daylight-saving Time, United States East Coast time zone.Server time is correctly identified in GMT time and date, repeat. And therefore you must check your script, ini or config setting. There is nothing wrong with the server time.

Share this post


Link to post
Share on other sites

If the time is exactly 2 months behind then why not fix it the cheap and easy way: open up the file and find the variable which contains the months and add "2" to it.I've checked as well, the server's time is correct. Are you sure it's not the script?

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.