Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
New post time display issue
Avatar
dave.preston
Member
Free Members
sp_UserOfflineSmall Offline
Dec 30, 2011 - 8:50 pm

One weird thing I've noticed is that fairly recent posts on the home page of the forum show the post time in seconds passed. For instance, instead of showing that the latest post in the Apples Forum was made 3 hours ago, it shows the latest post was made 10800 seconds ago. That's weird.

I just did a test post (brand new topic), saved it and checked the time. It should say the post was made 0 minutes ago (or something close), but it says the post was made 28778 seconds ago (7.99 hours ago).

Something is messed up with the time.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Dec 30, 2011 - 10:12 pm

so lets review your settings... what is the actual server time?  what is the time setting on wp general settings? and what time zone do you have selected for you, in your sp profile panel, options - display settings...

Avatar
dave.preston
Member
Free Members
sp_UserOfflineSmall Offline
Dec 30, 2011 - 10:41 pm

WP General Settings: Correct date/time

SP Options: Set to America/Vancouver (correct), F j, Y | g:i a

I'm not sure how to check what the server time is. I use Cpanel and am only vaguely familiar with it.

Edited to add: I just uploaded something to my server, checked the time, it was correct.

 

Edited to add (2): I need to point out that the time on the actual post (off to the left side) is correct. The time that is wonky and in seconds only shows on the front page of the forum. For instance, in one forum, in the right column it says...

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 31, 2011 - 11:43 am

Can you tell me exactly what time zone is set in the WP > general settings?

And I assume you mean that in your SP profile record you have a time zone set to Vancouver? Correct? Ah... one of favourite cities...

If you tell me these I can run some tests on my dev systems.

andy-signature.png
YELLOW
SWORDFISH
Avatar
dave.preston
Member
Free Members
sp_UserOfflineSmall Offline
Dec 31, 2011 - 12:59 pm

Swordfish, time in WP Settings/General is set to Vancouver.

And yes, my profile is also set to America/Vancouver.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 1, 2012 - 5:31 am

Ummm. I can get no problem with those settings.
Are you up for a small spot of simple theme editing?

andy-signature.png
YELLOW
SWORDFISH
Avatar
dave.preston
Member
Free Members
sp_UserOfflineSmall Offline
Jan 1, 2012 - 12:35 pm

As long as it's small. 🙂

I'm okay with simple instructions but I am not a coder.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 1, 2012 - 4:56 pm

OK - it's easy. Follow these steps:

  1. go to the forum admin > themes > theme editor
  2. select 'spGroupView.php' from the templates section on the right and it will load in the edit window
  3. scroll down to the comment/section 'Column 4 of the forum row
  4. in that section you will see the function sp_ForumIndexLastPost()
  5. that function has two parameters. The first one probably says: 'tagClass=spInRowPostLink' - we are going to add to this and make it:
  6. 'tagClass=spInRowPostLink&nicedate=0&date=1&time=1&stackdate=1'
  7. NOTE those ampersands between each part and no spaces.
  8. Save.
  9. Run the forum front page and we will find out if the post dates and times are accurate
andy-signature.png
YELLOW
SWORDFISH
Avatar
dave.preston
Member
Free Members
sp_UserOfflineSmall Offline
Jan 1, 2012 - 8:13 pm

Well, that is much better! No more negative numbers. I posted a test post (new topic) and this is the way it appears on the front page:

Last Post: Dave

Test Topic for time

January 1, 2012

6:10 pm

I believe it used to say how many minutes/problem-with-post-edit-buttonours ago it was that the last post was made in a particular forum, but I'll take the above instead of the wonky negative numbers.

Thanks, swordfish!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 2, 2012 - 4:47 am

So - the important bit of info - was the time on this post correct?

I was trying to establish if the underlying post date/time was being correctly returned or if the problem you were seeing is related to the conversion to the 'nice' date format.

This - so far - has been a one-off report which at the very least suggests that we do not have a regular error in the code but more likely some sort of specific combination of data. It would, of course, be useful to try and track down those specifics so we can knock them on the head.

Now - I assume that when you look at the forum view - list of topics - then you will still see the nice date being displayed as we haven't changed those. It might be useful if you could let me know what is being displayed for the same post in the forum view and the group view and, if possible capture those two items as close together in time as possible.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626