Jump to content

Recommended Posts

Posted

Hi there!

 

I''m trying to test cron jobs, but when setting the time I have no idea what time it is on the server, and thus what time the cron tabs think it is. Is there any easy way to look this up? (I'm on server 93 btw)

 

Cheers!

 

silentz

  • 1 month later...
Posted

I'm not sure where server 87 is located, but you can try running the following PHP script and see if it gives you the info you're looking for:

><?php
echo 'The current server time is ' . date('D d M Y h:i:s A T');
?>

On my server, the script outputs the following:

The current server time is Tue 08 Nov 2005 03:09:54 PM EST
Posted

I have several sites hosted on TCH. Is there another way besides running the above script to determine the server time?

 

I think one of my servers must be overseas because when I upload a file to the server it displays the file time as 6 or so hours later and I'm in the Central U.S. Time zone.

 

Thanks.

 

By the way, I use SmartFTP. I have it set so that it will "Keep File Time". I'm not sure how it is supposed to work but it only keeps the file time when I bring a file from the server down to my desktop. If I transfer a file to the server it takes the server time. Is that the way it should work? It would be nice if I could have all the file times be the same.

Posted
I have several sites hosted on TCH. Is there another way besides running the above script to determine the server time?

What other way would you like? :whip:

 

I think one of my servers must be overseas because when I upload a file to the server it displays the file time as 6 or so hours later and I'm in the Central U.S. Time zone.

I believe the FTP server is displaying file date/times in UTC. The U.S. Central timezone is UTC-6, so files would appear to have date/times 6 hours later than your local time.

 

By the way, I use SmartFTP. I have it set so that it will "Keep File Time". I'm not sure how it is supposed to work but it only keeps the file time when I bring a file from the server down to my desktop. If I transfer a file to the server it takes the server time. Is that the way it should work? It would be nice if I could have all the file times be the same.

The 'Keep File Time' check box uses the MDTM FTP command to sychronize the file times, and yes, this only works for files downloaded from the server. The spec for the MDTM command does not allow it set the time on files uploaded to the server.

Posted
What other way would you like? :whip:

I was wondering if there was something in cPanel or in the Server status/info, that I might have missed, that told the server time.

 

How do I run the php script that your described above?

 

Thanks.

Posted
I was wondering if there was something in cPanel or in the Server status/info, that I might have missed, that told the server time.

Not that I'm aware of.

 

How do I run the php script that your described above?

Upload it to your server in your /public_html directory, with a name like time.php, then go to http://your-TCH-domain.com/time.php in your browser.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...