T O P I C R E V I E W |
MarkJH |
Posted - 03 April 2005 : 07:48:05 Every other forum software I know has a section in the user's profile where they can change the time displayed to match their timezone. Now, isn't it about time that we had something like this for Snitz?
It would be just a dropdown box in the profile that gave a -12/+12 from GMT (or whatever) and when the clocks went back or forth it would be completely down to the user to adjust the time in their profile.
That's all it needs. No complicated equations to calculate daylight savings etc.
Please tell me if I'm over-simplifying things. < |
15 L A T E S T R E P L I E S (Newest First) |
lovduv |
Posted - 28 March 2007 : 01:08:21 Got it .... TY< |
lovduv |
Posted - 26 March 2007 : 22:50:06 Ok call me stupid, but I am confused. I installed this and it is working. However, I am not setting things correctly: The server time is EST, which is what I had it set on before, with correct time. I now have it set to GMT 0:00 (London, etc.), which shows the time for EST, and when I adjust my timezone to EST in my profile it sets it to GMT -5:00.
So what settings do I need, so that my members can adjust the post times to their time zone? Server is in the EST timezone and so am I.< |
MarkJH |
Posted - 22 February 2007 : 19:20:33 quote: Haven't tested whether or not it works past midnight okay but I'll see tonight.
Passed. < |
MarkJH |
Posted - 22 February 2007 : 13:29:33 Sorry about the late reply. I've been too busy to have a good look and test of this.
Right...
quote: Run this through mod set up
[ALTER] MEMBERS_PENDING ADD#M_TIME_ADJUST#varchar(4)##0 ADD#M_DST_ADJUST#smallint##0 [END]
I'm hoping you had e-mail validation turned on when you got the error and that this will fix it.
It fixed it good. Created a test account, changed the time to -1 GMT in my registration profile, logged on... -1 GMT. Excellent!
As to your today/yesterday fix, I found another way of doing it which is much simpler and kept the formatting intact - here. Haven't tested whether or not it works past midnight okay but I'll see tonight.
Thanks for all the work you've done with this, Cripto9t. Hopefully, that's all the bugs ironed out now. < |
cripto9t |
Posted - 13 February 2007 : 11:49:23 Mark, I threw this together and it seems to be working pretty good for the today part. I don't have post to check the yesterday part. It's more of a hack than anything. It basically hijacks the chkDate() function if the last post is less than 2 days old. I thought I had kwhipps mod down somewhere but I couldn't find it. I did find some of my old stuff that converts last post to a "1 hr 2 mins ago" like format, if your interested.
in the time adjust code in inc_func_common.asp
right after these lines
rsMemTime.close
set rsMemTime = nothing
end if Add this
'yesterday/today hack pt. 1
strUserFriendlyDate = true '$$ on/off switch - true for on / false for off
if strUserFriendlyDate then
if chkUFD(fDate) = 1 then
if trim(getUFD(fDate,fTime)) <> "" then
chkDate = getUFD(fDate,fTime)
exit function
end if
end if
end if
'$$ end pt 1 And right after the chkDate() function add this
'$$ yesterday/today hack pt. 2
function chkUFD(fDate)
dim tmpDate
tmpDate = StrToDate(fDate)
if DateDiff("d",tmpDate,Date) < 2 then
chkUFD = 1
else
chkUFD = 0
end if
end function
function getUFD(fDate,fTime)
dim thisDate,tmpDate
thisDate = StrToDate(fDate)
tmpDate = ""
if DateDiff("d",thisDate,Date) = 0 then
tmpDate = tmpDate & "Today"
elseif DateDiff("d",thisDate,Date) = 1 then
tmpDate = tmpDate & "Yesterday"
end if
if fTime then
tmpDate = tmpDate & " at " & chkTime(fDate)
end if
getUFD = tmpDate
end function
'$$ end pt. 2
< |
cripto9t |
Posted - 13 February 2007 : 09:39:57 Run this through mod set up
[ALTER]
MEMBERS_PENDING
ADD#M_TIME_ADJUST#varchar(4)##0
ADD#M_DST_ADJUST#smallint##0
[END] I'm hoping you had e-mail validation turned on when you got the error and that this will fix it.
I finally got a day off today and I'll give the yesterday/today thing a look. < |
MarkJH |
Posted - 11 February 2007 : 11:04:47 I don't think that registration works with your changes, Cripto.
Just tried to register and got this error:
Microsoft OLE DB Provider for SQL Server error '80040e14'
Invalid column name 'M_TIME_ADJUST'.
/forum/register.asp, line 804
I'll have to remove the code for the time being. < |
MarkJH |
Posted - 06 February 2007 : 18:33:23 Anything on this, Cripto? I know you're busy with the quiz MOD but I was just wondering if you'd taken a look at the code.< |
MarkJH |
Posted - 04 February 2007 : 18:18:31 Thanks. < |
cripto9t |
Posted - 04 February 2007 : 15:14:26 I'll give it a look Mark.< |
MarkJH |
Posted - 02 February 2007 : 16:41:51 Installed and working great. Good work!
I do have a slight problem though, and it's nothing to do with your MOD but something that maybe would be easy to fix...
I have the following code installed in inc_func_common.asp from kwhipp's Today/Yesterday MOD.
select case Mid(Request.ServerVariables("SCRIPT_NAME"), InstrRev(Request.ServerVariables("SCRIPT_NAME"), "/")+1)
case "admin_accounts_pending.asp", _
"admin_config_datetime.asp", _
"pop_printer_friendly.asp"
'
' For any page that needs the actual date, add the file name to the above case statement.
'
case else
select case left(fDate,8)
case left(DateToStr(date),8)
chkDate = "Today"
case left(DateToStr(date-1),8)
chkDate = "Yesterday"
end select
end select
if fTime then
chkDate = chkDate & separator & chkTime(fDate)
end if
The code just replaces today's and yesterday's dates with the words "Today" and "Yesterday". Thing is, it doesn't follow the Timezone time rules and at midnight, when today becomes yesterday, instead, yesterday remains "Today" and today just has a date. I hope that made sense...
Can you see in the code how this could be fixed?
If you can do this, maybe along with kwhipp's code, this would be great all wrapped up in a fully working MOD Add-On Forum (W/Code)/Snitzbitz MOD. < |
cripto9t |
Posted - 02 February 2007 : 10:03:50 Mark I got the dst box fixed. Also I had to make some changes to "register.asp" because the inputs weren't "sticking" as you said. I'm not going to post the changes here. Just download the zip file again. Make the change I marked in "inc_profile.asp" and make the 4 changes in "register.asp".
Let me know how it goes.< |
cripto9t |
Posted - 02 February 2007 : 07:42:43 hmmm... Like the chkSelect function the chkCheckbox function depends on a value from the members table that doesn't exist if your registering. So if I check strMode... I'll be back< |
MarkJH |
Posted - 28 January 2007 : 11:01:59 Seems to work fine, Cripto.
Still doesn't show the Daylight Savings box on register.asp, though.< |
cripto9t |
Posted - 27 January 2007 : 19:13:51 Sorry its taken me so long to reply guys. I think I fixed it. It's the ChkSelect2 function causing the problem.
Replace this code
for iTimeAdjust = 0 to ubound(intTimeAdjust)
Response.Write " <option value=""" & intTimeAdjust(iTimeAdjust) & """ " & ChkSelect2(rs("M_TIME_ADJUST"),intTimeAdjust(iTimeAdjust)) & ">" & txtTime(iTimeAdjust) & "</option>" & vbNewLine
next With this
for iTimeAdjust = 0 to ubound(intTimeAdjust)
Response.Write " <option value=""" & intTimeAdjust(iTimeAdjust) & """"
if strMode = "Register" then
if iTimeAdjust = "13" then response.Write "selected"
else
Response.Write ChkSelect2(rs("M_TIME_ADJUST"),intTimeAdjust(iTimeAdjust))
end if
Response.Write ">" & txtTime(iTimeAdjust) & "</option>" & vbNewLine
next Let me know how it works out< |