Author |
Topic  |
Walter8614
Starting Member
10 Posts |
Posted - 02 August 2002 : 03:27:05
|
Sinds yesterday I have a date problem by Active Topics on my forum. I have overwrite a few files, but it didn't sold my problem. Can someone help me?
Walter
|
|
Kat
Advanced Member
    
United Kingdom
3065 Posts |
Posted - 02 August 2002 : 04:22:12
|
Someone will certainly be able to help you.
Could you post us a little more detailed information about your problem? Such as what is actually happening?
KatsKorner
Installation Help | Snitz Mods | Forum Hosting
|
 |
|
Walter8614
Starting Member
10 Posts |
Posted - 02 August 2002 : 09:11:25
|
Yesterday when I and the other forum members were on the Active topic Page, was there last visit on 8 jan. 2002. Today there stands 8 feb. 2002. I allready overwrite active.asp, inc_functions.asp, inc_top.asp, config.asp, inc_subscription.asp, pop_subscription.asp, subscription_list.asp, but nothing works.
Walter
|
 |
|
Walter8614
Starting Member
10 Posts |
Posted - 11 August 2002 : 07:51:31
|
Can someone help me?
Walter |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
GauravBhabu
Advanced Member
    
4288 Posts |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
GauravBhabu
Advanced Member
    
4288 Posts |
Posted - 11 August 2002 : 08:27:36
|
Yeah I saw that after I posted.
|
CSS and HTML4.01 Compilant Snitz Forum . ForumSquare . Rakesh Jain
It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Prayer Of Forgiveness "I forgive all living beings. May all living beings forgive me! I cherish the friendliness towards all and harbour enmity towards none." -- Aavashyaka Sutra(Translated) |
 |
|
GauravBhabu
Advanced Member
    
4288 Posts |
Posted - 11 August 2002 : 09:16:53
|
Replace the function strTodate in inc_functions.asp with the following
function StrToDate(strDateTime) if ChkDateFormat(strDateTime) then StrToDate = cdate("" & Mid(strDateTime, 7,2) & "-" & Monthname(Mid(strDateTime, 5,2)) & "-" & Mid(strDateTime, 1,4) & " " & Mid(strDateTime, 9,2) & ":" & Mid(strDateTime, 11,2) & ":" & Mid(strDateTime, 13,2) & "") else tmpDate = DatePart("d",strForumTimeAdjust) & "-" & Monthname(DatePart("m",strForumTimeAdjust)) & "-" & DatePart("yyyy",strForumTimeAdjust) & " " & DatePart("h",strForumTimeAdjust) & ":" & DatePart("n",strForumTimeAdjust) & ":" & DatePart("s",strForumTimeAdjust) StrToDate = cDate(tmpDate) end if end function
|
CSS and HTML4.01 Compilant Snitz Forum . ForumSquare . Rakesh Jain
It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Prayer Of Forgiveness "I forgive all living beings. May all living beings forgive me! I cherish the friendliness towards all and harbour enmity towards none." -- Aavashyaka Sutra(Translated) |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 11 August 2002 : 09:44:51
|
Gaurav,
The fix posted works perfectly Ok, both with US and UK dates. It has been throughly tested by many users and it has eliminated the month / day switches that affected many users, and which I believe is the problem that originated this topic. Sorry, but I fail to see the point of this last suggestion of yours. |
Snitz 3.4 Readme | Like the support? Support Snitz too |
 |
|
GauravBhabu
Advanced Member
    
4288 Posts |
Posted - 11 August 2002 : 10:10:57
|
cdate function will return 8/11/2002(mm/dd/yyyy) as 8/11/2002(mm/dd/yyyy) or 8/11/2002(dd/mm/yyyy) depending on the locale settings. But it will always return 11-Aug-2002 as 8/11/2002(mm/dd/yyyy) or 11/8/2002(dd/mm/yyyy).
The function above is more compact and there is no need to find the server settings. |
CSS and HTML4.01 Compilant Snitz Forum . ForumSquare . Rakesh Jain
It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Prayer Of Forgiveness "I forgive all living beings. May all living beings forgive me! I cherish the friendliness towards all and harbour enmity towards none." -- Aavashyaka Sutra(Translated) |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 11 August 2002 : 10:40:53
|
quote: Originally posted by GauravBhabu
cdate function will return 8/11/2002(mm/dd/yyyy) as 8/11/2002(mm/dd/yyyy) or 8/11/2002(dd/mm/yyyy) depending on the locale settings. But it will always return 11-Aug-2002 as 8/11/2002(mm/dd/yyyy) or 11/8/2002(dd/mm/yyyy).
The function above is more compact and there is no need to find the server settings.
You're dead wrong on that. The fact that server settings were ignored were the cause for the problem with the original version that I changed.
Snitz dates are kept in a "YYYYMMDDHHMMSS" format. So when you call your proposed version with a date value got from the Snitz database, it will always convert it to the US date format, switching day and month, and causing the problems UK date format users have experienced for so long.
If you want to have keep a discussion on this I suggest that you post on the Dev Discussions forum. I don't like to see a fix that, since it was posted has solved every single help request topic posted at Snitz regarding this issue, being overturned by one that won't work.
I suggest that you test your fix thoroughly and only when you're sure that it will work, then submit it as a solution to a problem in the help forum. Otherwise it's better to recommend fixes that are known to work. |
Snitz 3.4 Readme | Like the support? Support Snitz too |
Edited by - ruirib on 11 August 2002 10:57:08 |
 |
|
GauravBhabu
Advanced Member
    
4288 Posts |
Posted - 11 August 2002 : 11:09:25
|
quote: Originally posted by GauravBhabu
cdate function will return 8/11/2002(mm/dd/yyyy) as 8/11/2002(mm/dd/yyyy) or 8/11/2002(dd/mm/yyyy) depending on the locale settings. But it will always return 11-Aug-2002 as 8/11/2002(mm/dd/yyyy) or 11/8/2002(dd/mm/yyyy).
The function above is more compact and there is no need to find the server settings.
quote: You're dead wrong on that.
Statements quoted are absolutely Correct. So it may be a time for you to reconsider your statement.
quote:
The fact that server settings are ignored were the cause for the problem with the original version that I changed.
MSDN Reference: CDate recognizes date formats according to the locale setting of your system. The correct order of day, month, and year may not be determined if it is provided in a format other than one of the recognized date settings.
quote: Snitz dates are kept in a "YYYYMMDDHHMMSS" format.
Yeah, it is not something new and was discussed in detail here. http://forum.snitz.com/forum/topic.asp?TOPIC_ID=14329
quote:
So when you call your proposed version with a date value got from the Snitz database, it will always convert it to the US date format, switching day and month, and causing the problems UK date format users have experienced for so long.
quote:
I don't like to see a fix that, since it was posted has solved every single help request topic posted at Snitz regarding this issue, being overturned by one that won't work.
You have not looked and tested the function posted by me. Otherwise you wont say so.
quote:
I suggest that you test your fix thoroughly and only when you're sure that it will work, then submit it as a solution to a problem in the help forum. Otherwise it's better to recommend fixes that are known to work.
I did and it works okay. Unless someone shows that it won't work.
quote:
If you want to have keep a discussion on this I suggest that you post on the Dev Discussions forum.
That will be a good idea.
|
CSS and HTML4.01 Compilant Snitz Forum . ForumSquare . Rakesh Jain
It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Prayer Of Forgiveness "I forgive all living beings. May all living beings forgive me! I cherish the friendliness towards all and harbour enmity towards none." -- Aavashyaka Sutra(Translated) |
Edited by - GauravBhabu on 11 August 2002 11:11:15 |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 11 August 2002 : 12:26:54
|
Well Gaurav I do retract my statement and I apologize for it. I have no problem recognizing I was wrong.
Your function will also work, I've tested it. The use of MonthName at the middle part of the date is really the key and the fundamental difference to the starting version of strToDate that I changed. That's what stops days and months being switched now, contrary to what happened before my correction.
In fact there still is a server date setting verification, the difference being that verification is now implicitly done by cdate, through the use on the month's name at the middle of the date string. Clever trick . |
Snitz 3.4 Readme | Like the support? Support Snitz too |
 |
|
GauravBhabu
Advanced Member
    
4288 Posts |
Posted - 11 August 2002 : 12:46:15
|
I appreciate and commend your response. Another advantage with the function posted by me is, though may be too little to be noticed, is performance gain because there will be one less if statement and one less function call (strComp). It is also compact as stated earlier and easier to maintain. I was almost at the end of a very lengthy post under Dev Discussions regarding this topic. There is no need of it now. |
CSS and HTML4.01 Compilant Snitz Forum . ForumSquare . Rakesh Jain
It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Prayer Of Forgiveness "I forgive all living beings. May all living beings forgive me! I cherish the friendliness towards all and harbour enmity towards none." -- Aavashyaka Sutra(Translated) |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
Topic  |
|