Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 Wrong date
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

Walter8614
Starting Member

10 Posts

Posted - 02 August 2002 :  03:27:05  Show Profile
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  Show Profile  Visit Kat's Homepage
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
Go to Top of Page

Walter8614
Starting Member

10 Posts

Posted - 02 August 2002 :  09:11:25  Show Profile
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

Go to Top of Page

Walter8614
Starting Member

10 Posts

Posted - 11 August 2002 :  07:51:31  Show Profile
Can someone help me?

Walter
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 11 August 2002 :  07:58:46  Show Profile  Send ruirib a Yahoo! Message
You probably have a problem with your strToDate function. Try the fix here:

http://forum.snitz.com/forum/topic.asp?TOPIC_ID=27320#129371


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 11 August 2002 :  07:59:37  Show Profile
This was discussed in this Topic here.

http://forum.snitz.com/forum/topic.asp?TOPIC_ID=14329

With The changes recommended in the above topic, I have had no problem with date swapping.

There is another solution posted by Ruirib

http://forum.snitz.com/forum/topic.asp?TOPIC_ID=25969

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)
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 11 August 2002 :  08:04:52  Show Profile  Send ruirib a Yahoo! Message
quote:
Originally posted by GauravBhabu


There is another solution posted by Ruirib

http://forum.snitz.com/forum/topic.asp?TOPIC_ID=25969


Gaurav,

Actually there is an update to the original fix, the topic being the one I posted above.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 11 August 2002 :  08:27:36  Show Profile
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)
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 11 August 2002 :  09:16:53  Show Profile
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)
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 11 August 2002 :  09:44:51  Show Profile  Send ruirib a Yahoo! Message
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
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 11 August 2002 :  10:10:57  Show Profile
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)
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 11 August 2002 :  10:40:53  Show Profile  Send ruirib a Yahoo! Message
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
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 11 August 2002 :  11:09:25  Show Profile
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
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 11 August 2002 :  12:26:54  Show Profile  Send ruirib a Yahoo! Message
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
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 11 August 2002 :  12:46:15  Show Profile
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)
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 11 August 2002 :  12:55:41  Show Profile  Send ruirib a Yahoo! Message
Sorry about the wasted time on the unpublished post .


Snitz 3.4 Readme | Like the support? Support Snitz too

Edited by - ruirib on 11 August 2002 12:57:40
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.49 seconds. Powered By: Snitz Forums 2000 Version 3.4.07