Welcome Guest ( Log In | Register)



 
Closed TopicStart new topic
> Gamma Server's Time Is Two Months Behind!
gameratheart
post Aug 16 2006, 08:09 PM
Post #1


Super Member
*********

Group: [HOSTED]
Posts: 498
Joined: 14-November 05
From: Britannia!
Member No.: 14,287



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?
Go to the top of the page
 
+Quote Post
BuffaloHELP
post Aug 18 2006, 01:41 AM
Post #2


Desperately seeking "any key" to continue...
Group Icon

Group: Admin
Posts: 3,463
Joined: 23-April 05
From: Trap17 storage box
Member No.: 6,042



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

HTML
<script type="text/javascript">

// Current Server Time script (SSI or PHP)- By JavaScriptKit.com (http://www.javascriptkit.com)
// For this and over 400+ free scripts, visit JavaScript Kit- [url=http://www.javascriptkit.com/]http://www.javascriptkit.com/[/url]
// 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://www.javascriptkit.com">JavaScript 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.
Go to the top of the page
 
+Quote Post
gameratheart
post Aug 28 2006, 02:59 AM
Post #3


Super Member
*********

Group: [HOSTED]
Posts: 498
Joined: 14-November 05
From: Britannia!
Member No.: 14,287



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.
Go to the top of the page
 
+Quote Post
BuffaloHELP
post Aug 28 2006, 03:29 AM
Post #4


Desperately seeking "any key" to continue...
Group Icon

Group: Admin
Posts: 3,463
Joined: 23-April 05
From: Trap17 storage box
Member No.: 6,042



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.
Go to the top of the page
 
+Quote Post
electriic ink
post Aug 28 2006, 10:54 AM
Post #5


Incest is a game the whole family can play.
Group Icon

Group: [MODERATOR]
Posts: 1,216
Joined: 11-February 05
From: Heaven
Member No.: 3,709



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?
Go to the top of the page
 
+Quote Post
BuffaloHELP
post Sep 11 2006, 06:17 AM
Post #6


Desperately seeking "any key" to continue...
Group Icon

Group: Admin
Posts: 3,463
Joined: 23-April 05
From: Trap17 storage box
Member No.: 6,042



Topic seems to be resolved since no more replies.

If you would like to continue this disucssion please PM a moderator.
Go to the top of the page
 
+Quote Post

Closed TopicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Why Is The Shoutbox Time Wrong?(5)
  2. Firefox 3 Sucks - Time For Another Browser(59)
  3. Achieve Planner(0)
  4. Manual Joomla Installation Failes(7)
  5. Budding Java Game Developers?(9)
  6. How I Lost 60lbs In 4 Months(1)
  7. Living Without Computer Today - Is It Possible?,(25)
  8. World Of Warcraft(29)
  9. Does Anyone Know Of Any Free Encoding Programs?(11)
  10. Microsoft Video Game Banned For Sex Scene(17)
  11. Made These Many Months Ago(1)
  12. How Do I Make My Own Private Online Server Please Help Me Out.thank You For Your Time.(26)
  13. Video Games Are A Complete Waste Of Time, Face It!(146)
  14. Debate With The Religions : Christian Vs Islam Vs More(16)
  15. New Sig Girl Here :)(7)
  1. Another Cust. Service Rant... This Time As A Customer(5)
  2. Background Image Swap Script(15)
  3. Date Time Lights Temp And Timer, It's Go It All(0)
  4. Story Time!(2)
  5. Asp.net Hosting On Linux Servers?(1)
  6. Slow Connection With Linksys Wrt54g Router(7)
  7. Worst Game Of All Time(60)
  8. Hlsw (gaming) Tutorial(2)
  9. Reducing Windows Vista Start Menu Programs Response Time.(4)
  10. Your All-time Worst Book(26)
  11. Time Viewing(14)
  12. 25 Of The Best Computer Hoaxes Of All Time(5)
  13. How Much Space Does Google Have On Their Servers?(47)
  14. Trap17 Forums: Is It Time For A Clean Out?(25)
  15. Poll: Best Games Of All Time!(55)


 



- Lo-Fi Version Time is now: 29th August 2008 - 11:18 PM