Wrong date?
https://www.s2ki.com/s2000/topic/868...another-s2000/
Date is messed up still.
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).

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).
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.
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.
Thread
Thread Starter
Forum
Replies
Last Post








