| Author |
Topic Search Topic Options
|
xjmajor
Newbie
Joined: 21 March 2006
Status: Offline
Points: 20
|
Post Options
Thanks(0)
Quote Reply
Topic: Last Visit Day and server in USA 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
Edited by xjmajor - 25 November 2006 at 1:38pm
|
 |
MadDog
Mod Builder Group
Joined: 01 January 2002
Status: Offline
Points: 3008
|
Post Options
Thanks(0)
Quote Reply
Posted: 25 November 2006 at 7:17pm |
|
You cant. The only option you have is to edit your profile and change the date format.
|
|
|
 |
xjmajor
Newbie
Joined: 21 March 2006
Status: Offline
Points: 20
|
Post Options
Thanks(0)
Quote Reply
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
|
 |
xjmajor
Newbie
Joined: 21 March 2006
Status: Offline
Points: 20
|
Post Options
Thanks(0)
Quote Reply
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
|
 |
xjmajor
Newbie
Joined: 21 March 2006
Status: Offline
Points: 20
|
Post Options
Thanks(0)
Quote Reply
Posted: 02 December 2006 at 10:11am |
|
Can I hope in somebody's help or I have to give up? Thank you again!
|
 |
SMR Group
Newbie
Joined: 05 June 2006
Status: Offline
Points: 31
|
Post Options
Thanks(0)
Quote Reply
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)?
|
 |
xjmajor
Newbie
Joined: 21 March 2006
Status: Offline
Points: 20
|
Post Options
Thanks(0)
Quote Reply
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.
|
 |
dpyers
Senior Member
Joined: 12 May 2003
Status: Offline
Points: 3937
|
Post Options
Thanks(0)
Quote Reply
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.
|
 |