Time Offset
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=17468
Printed Date: 17 April 2026 at 11:29am Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com
Topic: Time Offset
Posted By: seanlail
Subject: Time Offset
Date Posted: 06 December 2005 at 4:11pm
Hi all,
I am having a weird issue.
In the "Forum Preferences" (register.asp) there is a present server
date and time and the user has the ability to offset this to his local
time.
My problem is:
No matter where in the world my users are... they all see that the server time is exactly the same as theirs...
How can this be???
|
Replies:
Posted By: WebWiz-Bruce
Date Posted: 07 December 2005 at 4:38am
Because the time is that of the web server, which remains in the same
place ni matter where the user is who connects to the server.
In ASP there is noway to get UNC or GMT time, so the only place to get
the time from is the web server. The time on the web server remains the
same no matter where the user connects to the server from.
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
Posted By: ljamal
Date Posted: 07 December 2005 at 5:44pm
You can use JScript to get the time in GMT.
<script runat="server" language="jscript">
function getGMTTime()
{
var d, s;
d = new Date();
s = d.toUTCString();
return(s);
}
</script>
|
------------- L. Jamal Walton
http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming
|
Posted By: WebWiz-Bruce
Date Posted: 08 December 2005 at 9:41am
Yes, but the forum uses VbScript not JScript
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
Posted By: ljamal
Date Posted: 08 December 2005 at 11:00pm
However, your statement was
In ASP there is noway to get UNC or GMT time |
which is patently untrue.
Any ASP page can use both JScript and VBScript. If you use VBScript as your main language you just have to use the synatax sbove outside your script delimiters and you should be able to call the JScript function from within your application.
I use VBScript and this is what I use when I need the time in GMT. If you check out www.warmageddon.com you'll see that it displays the time in GMT (at the bottom of the page). That site is written in VBScript except for this one function.
The time in GMT can also be called via MSSQL by using the getUTCdate() function but that doesn't work in Access.
------------- L. Jamal Walton
http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming
|
Posted By: WebWiz-Bruce
Date Posted: 09 December 2005 at 6:48am
OK, I'll give it a go
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
|