GetSimple Support Forum

Full Version: Time Out by hours
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I think I mn needa little advice, I asked a question a few days about adding a timestamp to news posts on my site. This is sort of linked to that, which was I think solved

Could anyone answer what exactly effects the time on a site, I have selected GMT/Europe London for my timezone. I made a news post about 5 minutes ago (15.05 pm) yet the time-stamp displays 10:02:56 AM

http://www.carrowroad.net/cnews/index.ph...ng-lambert

I am unsure what else to try, a few minutes would be such a problem, but this is several hours, I take it that it also affected by what time my host provider is on to, how would I go about finding that out.

I would really like to get this solved
gordo Wrote:I think I mn needa little advice, I asked a question a few days about adding a timestamp to news posts on my site. This is sort of linked to that, which was I think solved

Could anyone answer what exactly effects the time on a site, I have selected GMT/Europe London for my timezone. I made a news post about 5 minutes ago (15.05 pm) yet the time-stamp displays 10:02:56 AM

http://www.carrowroad.net/cnews/index.ph...ng-lambert

I am unsure what else to try, a few minutes would be such a problem, but this is several hours, I take it that it also affected by what time my host provider is on to, how would I go about finding that out.

I would really like to get this solved

As far as I know, the setting for the backend user only effects the display on the backend, while the default php/server setting influences the display on the frontend.

Create a script time.php and run it on your server:
Code:
<?php
echo "Default time zone: ".date_default_timezone_get()."<br/>\n";
echo "It is ".date('Y-m-d H:i:s T (O)')."<br/>\n";
echo "Setting time to UTC...<br/>\n";
date_default_timezone_set('UTC');
echo "It is ".date('Y-m-d H:i:s T (O)')."<br/>\n";

If the time displayed is correct, but in the wrong timezone, you might just set $TIMEZONE='Europe/London'; (or similar) in gsconfig.php (didn't try it), this will probably correct the standard get_page_date function. Otherwise try adding date_default_timezone_set('Europe/London'); (or similar) in your gsconfig.php.

If the displayed time is incorrect, it means that the server/os is set to the wrong time. You should correct this on the server.
If you can't correct it or your provider won't correct it, you have to define a (wrong) default timezone offset by the same amount (but should never display the timezone itself to the user). But I would rather change the provider, if he can't set his servers to the correct time.
thanks for reply.

The server check came out at the correct time. So have tried what you suggest and added default time to gsconfig.

I don't suppose that it will change what is already posted, so will try on the next post and see what if anything changes. at least as you said it displays correctly on the backend for the rss feed.

thanks again
gordo Wrote:thanks for reply.

The server check came out at the correct time. So have tried what you suggest and added default time to gsconfig.

I don't suppose that it will change what is already posted, so will try on the next post and see what if anything changes. at least as you said it displays correctly on the backend for the rss feed.

If the server time is correct, all previously saved dates should be corrected by this setting, as long as the date was stored including the timezone (as is the case for the page dates, e.g. <pubDate>Sat, 07 May 2011 07:14:04 -0400</pubDate>).
I don't know, it is still displaying by hours out. posted another news story at 9.55 and the time on the post is 04:54:44 AM.
gordo Wrote:I don't know, it is still displaying by hours out. posted another news story at 9.55 and the time on the post is 04:54:44 AM.

Is this just for news? Which news plugin do you use?

If you add <?php get_page_date(); ?> to your template, does it display the correct time, at which you modified the displayed page (e.g. index page)?
it is News Manager 2.2.4. I made a copy of the default template just for the News to display on that page, just added , <?php get_page_date(); ?> to the template and nothing has changed. still hours out.

OK enough of this. where abouts would the whole timestamp be so I can stop it from displaying ? It is just in the News manager from what I can see
gordo Wrote:OK enough of this. where abouts would the whole timestamp be so I can stop it from displaying ? It is just in the News manager from what I can see

Gordo, have a look at the language file. The last entry defines the date-format, f.e., so it is easy to modify:

Code:
# date settings
"DATE_FORMAT"         =>  "%d.%m.%Y"
I don't think it is just modifying the file, Connie I may be wrong but to me there is some wrong, when the time displayed on News Posts is 5 hours out.

I tried to alter the News Manager plug-in file (inc/site.php) trying stop the date and time displaying totally in the ( function nm_show_post

but I clearly got that wrong as I presented with a white blank page
my apologises Connie I think I misunderstood what you were saying exactly, I have taken the time display off of the news via the language file, just leaving the date, the problem still isn't solved but I am happy, the backend displays the correct time.

so my apologises once more