Site Info Open forum for the discussion of the S2K International site and organization. If you like what we're doing, post it here. If you don't, post it here too. Get answers to site related questions.

Wrong date?

Thread Tools
 
Old May 13, 2011 | 04:46 PM
  #11  
zdave87's Avatar
Thread Starter
Member
Member (Premium)
20 Year Member
Liked
Loved
Community Favorite
 
Joined: Apr 2004
Posts: 82,468
Likes: 1,194
Default

Originally Posted by cthree
The date/time is correct. It is not being displayed correctly for your timezone. Check your settings.
My settings are GMT/Eastern Time Zone.

https://www.s2ki.com/s2000/topic/868...another-s2000/

Date is messed up still.
Reply
Old May 15, 2011 | 08:10 PM
  #12  
Keatre's Avatar
Registered User
 
Joined: Mar 2009
Posts: 168
Likes: 0
From: DFW, TX
Default

WARNING: LARGE PICTURE.

I apologize about the huge picture and blowing up the frames, but I had to inorder to show everything.

I have my preferences, an example and the local time open at the same time. It appears only to happen in the evening (9:00 or later).
Reply
Old May 16, 2011 | 09:49 AM
  #13  
cthree's Avatar
Administrator
20 Year Member
 
Joined: Oct 2000
Posts: 20,274
Likes: 4
From: Toronto, Canada
Default

I really not sure how to explain this so it makes sense but here goes...

The software does not provide the date a topic was started to the template except as a character string, A long one, like "Saturday, May 14, 2001 11:23 AM", like that. To put the start date under the starter name, that is all I have to work with. The problem is it is a) too long to fit and look good and b) not relative to "now", ie. Today at 11:23 AM or Yesterday at 11:23 AM, like all the other date values.

To get relational dates I need to use template function called "parse_date" and what you get from that is what you see on the site, a compact relative date.

The problem I have is that parse_date takes a date type value not a string type value so I need to pass the string through php's date/time parser to get a date value I can pass to parse_date to get the start date of the topic. Get it? Good.

The bigger problem is that php doesn't know your time zone, nor do I so when the date gets converted it can get messed showing the start date at the server (the server has its clock set to UTC) not GMT-6 or whatever you have your timezone set to which means that at 10PM your time the date will show as tomorrow but when you get to midnight when you are you will be on the same day as UTC and it will show the correct date and time.

The only option is to hack the software to pass in the topic start date as a date value and not a string or to ask the developers to do it in a future version so I don't have a hack to workaround the next time I need to upgrade the software to fix security or bugfix issues.

Sorry, I don't know how to explain it in a simpler way. The date/time is correct. It becomes broken when it gets displayed on that page when you aren't on the same day as the server. I'm not going to fix it right now because it is just a display bug and doesn't effect the database.
Reply
Old May 16, 2011 | 08:45 PM
  #14  
Keatre's Avatar
Registered User
 
Joined: Mar 2009
Posts: 168
Likes: 0
From: DFW, TX
Default

Good explanation, easy enough to understand - I appreciate it.

As you said, it's not a dire issue by any means. Thanks for staying ontop of it, though.
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
AZH
Arizona S2000 Owners
7
Oct 3, 2013 07:42 AM
Dan Hale
Site Info
4
Jul 8, 2011 10:10 AM
thebig33tuna
Site Info
5
Aug 13, 2010 12:56 PM
Lainey
New England S2000 Owners
3
May 6, 2005 04:24 AM
Legal Bill
Site Info
2
Aug 21, 2004 12:10 PM




All times are GMT -8. The time now is 01:34 PM.