Support Forum

Latest posts displaying x seconds ago

DU dunc
dunc
Member

Hi all,

I’ve already read the guide here: http://codex.simple-press.com/codex/faq/troubleshooting/why-do-my-new-posts-show-as-posted-minus-seconds-ago/ but I can’t see a problem with my setup.

If I go in to my user profile I see the following under “Display Options”:

Server Timezone set to: Europe/London

This timezone is currently in daylight savings time

Server Time is: 2013-09-11 13:08:02

Local Time is: 2013-09-11 13:08:02

UTC Time is: 2013-09-11 12:08:02

All of that looks right to me, so can anyone explain why posts say “-3508 seconds ago” etc. when first posted?

13 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

i don’t know where you are seeing all that as we do not show all that on our SP user profile panels.
It is a two fold thing. One is the WP Settings > General timezone and the other is the SP profile. So what are those two actually set to?

DU dunc
dunc
Member

Those lines were taken from my user profile on SP (options -> display options). I thought they would provide the information required rather than me having to type stuff out!

WordPress has “London” selected and SP has “Europe/London” so I have no idea why there would be discrepancies?

YS Yellow Swordfish
Yellow Swordfish
Member

My apologies. I was looking at the overiew panel not the actual options and you are, of course, quite right.

So – going back to the posts in question – were these two timezone settings like this when these posts were made? And if not what is the situation with new posts?

DU dunc
dunc
Member

Well I don’t know about other users but I posted a thread with those exact settings (haven’t changed anything like that since we installed SP some time ago) and it bugged out for me, displaying “-507 seconds ago” on the forum index under “Latest post”.

YS Yellow Swordfish
Yellow Swordfish
Member

OK let’s step back please – I am not getting a clear picture here. If there was an inherent problem I would expect (a) it to most probably manifest itself to all users and (b) manifest itself on all posts made. Can you confirm either or both?

DU dunc
dunc
Member

By “I don’t know about other users” I meant I don’t know about their SP timezone settings.

It appears on all posts to all users for the first hour after they’ve posted. It would certainly appear to be the issue mentioned in your codex but all of my settings are correct.

I’ve just done this one:

seconds-ago.png
MP Mr Papa
Mr Papa
Member

for the first half hour?  strange… cant think of anything that would do that…  would make more sense if it was an hour where there was changes…

and I assume the the server is actually located in London?  it would be where you host is physically located the box and configured the server time…

so is this something new?  you have been around here a while, so really asking did this just start happening?

DU dunc
dunc
Member

I said “the first hour”, your mind is adding things into my posts :D

Ahah, wait – I think we have the problem here. My box is located in FR, not UK! So it’s CET not GMT. Which of my settings needs to reflect that, WordPress?

EDIT: I’ve changed the WordPress setting to “Paris” but the problem still occurs.

YS Yellow Swordfish
Yellow Swordfish
Member

Still persists for new posts? It will not effect existing posts which are already timestamped.

DU dunc
dunc
Member

Still persists for new posts, yeah. My SP profile is still set as Europe/London but surely that should be correct so individual users can set their personal timezones?

YS Yellow Swordfish
Yellow Swordfish
Member

Well yes – the post you showed the image of yesterday was one hour out…

Now – the only other thing we have encountered in the past is another plugin resetting the php timezone to whatever it needs and then not setting it back to the WP setting. This is per page load of course. I recall one of these plugins was an event calendar type. I rather thought we had plugged all of those holes but that may have been just because we had not encountered other plugins that may do a similar thing.

So the next question has to be do you have any plugins active that may utilise or change the session timezone for any reason – and that is not, of course, just limited to event calendars?

DU dunc
dunc
Member

Is there a particular PHP command that I should be looking for? Probably easier just to CTRL+F all of my plugin files.

YS Yellow Swordfish
Yellow Swordfish
Member

I would suppose that the functions date_default_timezone_get() and date_default_timezone_set() are the most common but by no mean all of them…