Support Forum

Timestamping Issue

29 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

Karthik: Looks like I might have a fix working for the widget and popup. Simple code change. If you want it let me know and I can publish here so you can try it.

EK Edward Koon
Edward Koon
Member

Well lets see here.. My WordPress is set at UTC-4 which is correct for my time zone EST counting DST. OK, so WordPress reports the correct time under settings > general settings.

OK, now in order for my posts to display the correct time in SP i have to set my time zone in SP profile to UTC+0 to display the proper time when i submit a post.

This is obviously a SP error in translating the user profiles correct time zone.  In other words, if someone is in UTC-4 zone with DST they would set their profile time to UTC+0. That’s what i did and the time stamp is correct. wink

EK Edward Koon
Edward Koon
Member

There must be something else wrong.

A member posts a new topic, but when I’m looking at the group of topics, especially the one that was just posted says last post 4 hours ago.

This support site told be the same thing this afternoon when i logged in to read a post i was just notified about. So it’s not only my site that’s having problems with time stamps. frown

KS Karthik Subramanian
Karthik Subramanian
Member

Yellow Swordfish said
Karthik: Looks like I might have a fix working for the widget and popup. Simple code change. If you want it let me know and I can publish here so you can try it.

Cheers Swordfish. Let me know the coding procedure.  Yea, I just noticed the popups within the forum exhibit the same issue as well. Will it fix that issue too? (I.e.: When clicking on an “unread post” and a pop up comes up with a list of unread posts with a timestamp.

 

Here is a screenpic of the pop-up unread post list showing the “seconds” issue. (I’ve cut out the topic title :P)

 

http://imageshack.us/photo/my-images/193/popup1.jpg/

YS Yellow Swordfish
Yellow Swordfish
Member

OK – the file  you need to edit is called /sp-startup/sp-load-ahah.php

There is a small routine in there called sp_forum_ahah_support() – note this is the second function of the two.

We need to add one extra line of code to this and I have placed it in the second line of the function so you can easily see it below:

function sp_forum_ahah_support() {
    include_once(SPBOOT.'sp-load-core.php');
    sp_set_server_timezone();
    sp_load_current_user();
    include_once(SPBOOT.'sp-load-site.php');
    include_once(SPBOOT.'sp-load-forum.php');
    sp_get_track_id();
}

That has solved the issue of the widget and new posts popup for a test user last night so hopefully is what is needed.

YS Yellow Swordfish
Yellow Swordfish
Member

FidoSysop: This would have been much easier as a new thread!

OK – I am still not getting a good picture here whatsoever. So let’s please go back to basics and take this slowly one point at a time. It would be easier for me if we were talking city settings instead of UTC but if that is your preference then OK.

Let’s start with three questions. Firstly about THIS site.

  1. On THIS site – Simple-Press – what timezone do you have set in your SP profile – display options?
  2. When you read THIS post – the date and time will be shown on the left above my avatar. Note that and then go back to the topic list to check if the time reported there matches. Does it?

Now to your site.

  1. So you have your WP server set to timestamp posts in UTC-4 – which I assume is correct for Florida. I know I have asked this already but the answer was ambiguous. When you make a new post on YOUR site – is the date/time correctly set in the database for that post. Again this is best determined by looking at the date/time shown on the left of the post above the avatar – or – directly in the database.

Let’s get these points definitively cleared up first…

KS Karthik Subramanian
Karthik Subramanian
Member

Yellow Swordfish said

That has solved the issue of the widget and new posts popup for a test user last night so hopefully is what is needed.

That seems to have resolved the issue. Cheers Swordfish 🙂

YS Yellow Swordfish
Yellow Swordfish
Member

That’s great news.Thanks very much for trying it.

GW Griff Wigley
Griff Wigley
Member

Yellow Swordfish said
OK – the file  you need to edit is called /sp-startup/sp-load-ahah.php

When I’m logged in as the admin, the timestamps on the replies are correct, ie, all UTC-5.

But when I log in as one of my new users, the timestamps are waaaay off, maybe UTC+5?

So to fix this, I need to do this SP file edit?

MP Mr Papa
Mr Papa
Member

have your users set THEIR timezone in their profile options?  profile – options – display options

GW Griff Wigley
Griff Wigley
Member

No, all users are brand new today and haven’t touched their profiles.  I have a test user account and set the TZ to be UTC+0 but it didn’t change the timestamps of the replies… which is why I think there’s a glitch.

MP Mr Papa
Mr Papa
Member

except this is generally working for tens of thousands of users… doesnt mean something couldnt be wrong, but need help in duplicating if real issue…

so, lets start from the beginning…  what is the timezone setting in wp settings?  and why use the UTC offsets?  WP messed up including them since they are not valid timezone strings for php…  php does like it alot better if you pick actual timezones…

and then for your user account and the test account, you picked different timezone strings (again, a real timezone string) and the times are the same?

GW Griff Wigley
Griff Wigley
Member

Steve, I set WP to Chicago TZ and then both the SP admin and testuser profiles to Chicago TZ and that appears to have fixed it.

Thanks much!