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
Timestamping Issue
Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 29, 2012 - 4:50 pm

Well the date/time saved in the database should represent the time zone as set in the WP General Settings. So to save me doing contortions on this are you saying that was not the case? Looks like it was an hour out maybe.

andy-signature.png
YELLOW
SWORDFISH
Avatar
FidoSysop
Clearwater Florida
Member

VIP
sp_UserOfflineSmall Offline
Mar 29, 2012 - 5:05 pm

I just noticed the post time was correct when i was logged out. So it must have something to do with my profile time setting not being right.

When i just logged in here after getting your email notification, i clicked on the subscribed button, one new message and was told the last post was 5 hours ago. >Last Post [Image Can Not Be Found]  Yellow Swordfish  5 hours ago<

Maybe the time offsets in the user profile settings are off by 5 hours? I'm sure i can either add or deduct what ever time zone it takes to be correct.

I just noticed the difference in message times between login and log out.

  • Doc ~ An old Fidonet SysOp. Just hanging out in cyberspace keeping up with tech.
Avatar
FidoSysop
Clearwater Florida
Member

VIP
sp_UserOfflineSmall Offline
Mar 29, 2012 - 5:08 pm

I should add on my site the logged in and logged out times are different. Don't know if that's the case here since i cant see the message unless I'm logged in.

  • Doc ~ An old Fidonet SysOp. Just hanging out in cyberspace keeping up with tech.
Avatar
FidoSysop
Clearwater Florida
Member

VIP
sp_UserOfflineSmall Offline
Mar 29, 2012 - 5:21 pm

Changing my profile TZ to UTC+0 corrected the problem.. wink

  • Doc ~ An old Fidonet SysOp. Just hanging out in cyberspace keeping up with tech.
Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 29, 2012 - 6:23 pm

I am not really sure what it is you are trying to tell me - a bit confused. So maybe if I tell you what is supposed to happen you can ascertain whether it is or not...

Forum posts - like WP blog posts - are saved with the date/time as set in the WP server timezone (Settings > General). Once set - this should never be changed. This setting is NOT intended to be the location of the physical server but the timezone you want your dated posts to be stamped in usually your 'home' zone. (Although - of course -the site owner can set it to whatever they prefer).

Anybody who visits your site as a non-logged in user - or - a user who has not set up their personal timezone (SP > Profile > Display Options) - will see the forum posts with the date/time as recorded in the database - i.e., the server timezone.

A logged in user who HAS set their personal timezone will see the date/time on posts adjusted to their personal timezone if this is different from the server zone.

Does this make sense? Is this how things are working on your site?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 29, 2012 - 6:30 pm

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.

andy-signature.png
YELLOW
SWORDFISH
Avatar
FidoSysop
Clearwater Florida
Member

VIP
sp_UserOfflineSmall Offline
Mar 29, 2012 - 7:21 pm

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

  • Doc ~ An old Fidonet SysOp. Just hanging out in cyberspace keeping up with tech.
Avatar
FidoSysop
Clearwater Florida
Member

VIP
sp_UserOfflineSmall Offline
Mar 29, 2012 - 8:24 pm

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

  • Doc ~ An old Fidonet SysOp. Just hanging out in cyberspace keeping up with tech.
Avatar
Karthik Subramanian
Member
Free Members
sp_UserOfflineSmall Offline
Mar 29, 2012 - 8:56 pm

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-.....opup1.jpg/

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 30, 2012 - 3:55 am

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.

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