Author |
Topic |
|
Deleted
deleted
4116 Posts |
Posted - 08 February 2003 : 12:40:42
|
Not a critical issue, I posted that before but it got archived: http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=38023
Because I'm trying to compile the bugs/issues I found during v4 development any input into this will be much appreciated...
Here is the post I made:
quote:
In admin_accounts_pending.asp, on line 403:
days = DateDiff("d", ChkDate(MP_MemberDate,"",false), strForumTimeAdjust)
This calculates the days passed from membership begin. I found a value of 178 there yesterday. I think it should be:
days = DateDiff("d", StrToDate(MP_MemberDate), strForumTimeAdjust)
and GB answered:
quote:
Both statements are referring to same datestring(MP_MemberDate). The only difference is that the first statement eliminates the time part (due to "false" as an argument while calling function chkDate) from the MP_MemberDate and second statement retains both date and time of registration. That should not make difference in calculating the days.
I'm not sure if this answer is absolutely true for example in case of servers in non-US locales, with other date/time format defaults...
The chkDate function returns a formatted string depending on strDateType (set in admin_config_datetime.asp) and intended to be used to "display" a date-time value in Snitz database format.
On the other hand, the above calculation needs a date object, where we need the StrToDate function, to return the correct value.
While having the timezone mod implemented in v4, strForumTimeAdjust is calculated as (maybe subject to change as a result of another related discussion):
strForumTimeAdjust = DateAdd("n", - intForumBias - intForumDaylAdjust, DateAdd("n", + intServerBias , Now()))
and the result is a date object in forum date-time... The value of the database field also calculated from strForumTimeAdjust (in register.asp around line 457)
strSql = strSql & ", " & "'" & DateToStr(strForumTimeAdjust) & "'"
my proposition seems correct to me...
|
Stop the WAR! |
Edited by - Davio on 08 March 2003 17:12:40 |
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 08 February 2003 : 15:08:55
|
quote: I'm not sure if this answer is absolutely true for example in case of servers in non-US locales, with other date/time format defaults...
I agree with you bozden. |
|
|
Deleted
deleted
4116 Posts |
Posted - 08 February 2003 : 16:23:22
|
Thanks for confirmation
Fixed in v4b04 alpha 03...
|
Stop the WAR! |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 08 February 2003 : 16:33:07
|
Yeah, I can testify that you should use StrToDate instead of chkDate. btekcan had a problem with his Crash modded forum based on Snitz 3.4 because of this, causing the pending days value of pending members to be absurd. It was fixed when I suggested the change to StrToDate from chkDate. |
Snitz 3.4 Readme | Like the support? Support Snitz too |
|
|
Deleted
deleted
4116 Posts |
Posted - 08 February 2003 : 16:42:51
|
Then, this should be moved to the bugs forum .
|
Stop the WAR! |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
Deleted
deleted
4116 Posts |
Posted - 16 February 2003 : 13:34:43
|
This was fixed in v4b04 alpha 03... Locking... |
Stop the WAR! |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 07 March 2003 : 10:17:46
|
I'm not sure what changes you made to fix this bozden. Can you just clarify the changes you made? |
Support Snitz Forums
|
|
|
Deleted
deleted
4116 Posts |
Posted - 08 March 2003 : 16:33:41
|
Sure Just use the original suggested change:
In admin_accounts_pending.asp, on line 403, change:
days = DateDiff("d", ChkDate(MP_MemberDate,"",false), strForumTimeAdjust)
To this:
days = DateDiff("d", StrToDate(MP_MemberDate), strForumTimeAdjust)
|
Stop the WAR! |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 07 February 2004 : 12:09:32
|
fixed again in v3.4.04 - download file has been updated. |
|
|
|
Topic |
|