Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Last Visit Day and server in USA
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Last Visit Day and server in USA

 Post Reply Post Reply Page  12>
Author
xjmajor View Drop Down
Newbie
Newbie


Joined: 21 March 2006
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote xjmajor Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
MadDog View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 01 January 2002
Status: Offline
Points: 3008
Post Options Post Options   Thanks (0) Thanks(0)   Quote MadDog Quote  Post ReplyReply Direct Link To This Post Posted: 25 November 2006 at 7:17pm
You cant. The only option you have is to edit your profile and change the date format.
Back to Top
xjmajor View Drop Down
Newbie
Newbie


Joined: 21 March 2006
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote xjmajor Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
xjmajor View Drop Down
Newbie
Newbie


Joined: 21 March 2006
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote xjmajor Quote  Post ReplyReply Direct Link To This Post 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


Back to Top
xjmajor View Drop Down
Newbie
Newbie


Joined: 21 March 2006
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote xjmajor Quote  Post ReplyReply Direct Link To This Post Posted: 02 December 2006 at 10:11am
Can I hope in somebody's help or I have to give up?
Thank you again!
Back to Top
SMR Group View Drop Down
Newbie
Newbie


Joined: 05 June 2006
Status: Offline
Points: 31
Post Options Post Options   Thanks (0) Thanks(0)   Quote SMR Group Quote  Post ReplyReply Direct Link To This Post 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)?
Back to Top
xjmajor View Drop Down
Newbie
Newbie


Joined: 21 March 2006
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote xjmajor Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.