Jump to content
xisto Community
Sign in to follow this  
BOAW

Server Time Help

Recommended Posts

My Webpage If you check here in my site in my Login block called "user info" at the bottom it tells u the "server time". Well that server time for me is wrong. This is what is displayed

Server Timeˇ Time 14:06:53

ˇ Date 19 Feb 2006

ˇ Timezone +0000


The Date is right but the Timezone and Time are just way off. My Timezone should be -500. What do i have to do to fix this? Is it in my cpanel or do i have to go edit this block itself??

Share this post


Link to post
Share on other sites

The time on your page is displaying the time received straight from the server's time (most probably by using the php date function).If you were to fine tune this, lets say forward or backwards an hour, then the timezone should theoretically add the difference between your time and the time of this server (which is actually in Grenwich Mean Time (GMT - British Time.)).p.s. If you need another time code that allows you to fine tune the time, just reply. But the reasons explained above are what's happening to your site.Hope this helps :-)

Edited by sportytalk (see edit history)

Share this post


Link to post
Share on other sites

Just a quick note. The British time is based on UTC, not GMT. On 1 January 1972, GMT was replaced as the international time reference by Coordinated Universal Time (UTC). That's over 30 years ago. :huh:

Share this post


Link to post
Share on other sites

Hmm, not entirely true. Although UTC has superceded GMT, the term GMT is still commonly used in reference to timezones (ie. GMT+x).

 

Anyway, this error is purely related to the PHP script being used, and has nothing to do with cPanel (I've got no idea where you're headed with that one...) In order to display the difference to GMT, simply call the date() function including 'O' in the format string, which will display the GMT difference in hours. For example:

 

echo 'Timezone: ' . date('O');

Share this post


Link to post
Share on other sites

hehe, I believe both GMT and UTC are acceptable today :huh: Whilst we are on the subject of server time, does anyone know the timezone of the Cron System (in relation to GMT [GMT +x])?Was trying to have a task carried out at 7pm GMT, but it happens at 3am or something like that. I thought it was 8 hours ahead, but the timezone doesn't seem to be consistent.

Edited by sportytalk (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
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.