Last Visit Day and server in USA
Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=22024
Printed Date: 08 April 2026 at 1:15pm Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com
Topic: Last Visit Day and server in USA
Posted By: xjmajor
Subject: Last Visit Day and server in USA
Date Posted: 25 November 2006 at 12:21pm
Hi, I'm running a MSSQL 2005 version of WWF.
The ASP pages are on an Italian server, the Database is on a USA (east coast) server.
So, the behaviour of date is: all OK with date of posts, PM etc, international date for cookies and sessions is 6 hours back, according with date generated by DB server.
Where can I correct the code to shift the date for cookies and sessions 6 hours later?
I guess it is a simply operation (write +6 somewhere), but before I make mistakes, I ask for your help.
Thank you for all,
Damiano Morelli
|
Replies:
Posted By: MadDog
Date Posted: 25 November 2006 at 7:17pm
You cant. The only option you have is to edit your profile and change the date format.
------------- http://www.iportalx.net" rel="nofollow">
|
Posted By: xjmajor
Date Posted: 26 November 2006 at 11:50am
Ok, I know my english is ridicolous, so I try to explain better.
Thanks to MadDog, but the problem is NOT the time / date in the profile, but time/date set by cookies and sessions.
My asp page are on italian server, my SQL db is on East Coast server.
Time and date, in the profile, indicate the correct timing in Italy, so when I write a message or a PM, the time is correct.
But if I look at the main forum page, I see by example: Time is 12.00 pm. Last visit is at 6.00 am.
And if I go to active topics, the last visit time is shifted on the db server time, 6 hours back from Italy and server with asp pages time.
There is a function, in function_common.asp, about internationalDateTime (or something similar, I haven't the code now).
This function renders time of database server (the one in the USA).
I need to shift the time rendered by this function 6 hours later, so it is synchronized with time of the server with asp pages in Italy.
Thank you again,
Damiano
|
Posted By: xjmajor
Date Posted: 27 November 2006 at 11:51pm
I looked at the code, I guess I need to modify the function in function_common.asp, adding a DATEADD somewhere. Can someone help me? Here's the snippet I think to be modified. After modifying Variable internationalDateTime would be +6 hours shift. Where to insert a DATEADD?
'********************************************** '*** Format ISO International Date/Time **** '**********************************************
'Function to format the present date and time into international formats to prevent systems crashes on foriegn servers Private Function internationalDateTime(dtmDate)
Dim strYear Dim strMonth Dim strDay Dim strHour Dim strMinute Dim strSecound
strYear = Year(dtmDate) strMonth = Month(dtmDate) strDay = Day(dtmDate) strHour = Hour(dtmDate) strMinute = Minute(dtmDate) strSecound = Second(dtmDate)
'Place 0 infront of minutes under 10 If strMonth < 10 then strMonth = "0" & strMonth If strDay < 10 then strDay = "0" & strDay If strHour < 10 then strHour = "0" & strHour If strMinute < 10 then strMinute = "0" & strMinute If strSecound < 10 then strSecound = "0" & strSecound
'This function returns the ISO internation date and time formats:- yyyy-mm-dd hh:mm:ss 'Dashes prevent systems that use periods etc. from crashing internationalDateTime = strYear & "-" & strMonth & "-" & strDay & " " & strHour & ":" & strMinute& ":" & strSecound End Function
|
Posted By: xjmajor
Date Posted: 02 December 2006 at 10:11am
Can I hope in somebody's help or I have to give up? Thank you again!
|
Posted By: SMR Group
Date Posted: 03 December 2006 at 5:59pm
|
Can't you just change the time on your server? Or do you not have root access via Remote Desktop (or similar)?
|
Posted By: xjmajor
Date Posted: 04 December 2006 at 9:22am
I can't access to the server located in the USA, where I just can operate on SQL database. The issue affects just the session time, not the time of messages. Now, like the time of messages can be shifted by changing profile, I guess I can add somewhere 6 hours to the session date, but I'm not able to understand where. Thanks.
|
Posted By: dpyers
Date Posted: 05 December 2006 at 12:45am
The session last visit stuff is done in functions/functions_login.asp
Starts around line # 360
-------------
Lead me not into temptation... I know the short cut, follow me.
|
Posted By: xjmajor
Date Posted: 05 December 2006 at 9:26am
Thank you. But it send back to function
internationalDateTime
I think I must add 6 hours to this function, to have correct session time.
This function is in functions/functions_common.asp, around line 1230, I pasted the snippet some message above.
I need to write the time in this function 6 hours up.
|
|