ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old March 22nd, 2003, 02:24 PM
ralphuk100's Avatar
ralphuk100 ralphuk100 is offline
meester luva luva
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Posts: 2,649 ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 20 h 52 m 29 sec
Number of bans: 1
Reputation Power: 19
Send a message via MSN to ralphuk100
changing time locale.....

Ok,

I am using

<%
Locale = Session.LCID
Session.LCID = &H1033
Response.Write FormatDateTime(Time)
Session.LCID = Locale
%>

as I am hosted on a US server, but I need to display the time in GMT. This code still displays the server time though. Would it be better to just display <%=Time()%> and then knock 5 hours off the US time? If so, would <%Time(-5)%> work?

Reply With Quote
  #2  
Old March 23rd, 2003, 10:00 PM
ngibsonau ngibsonau is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 138 ngibsonau User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
How about

Code:
DateAdd("h",-5,Time)


but as I always say Javascript is much better for ASP than VBScript

Code:
<script language="javascript" runat="server">
var objDate = new Date();
var d = objDate.toGMTString() 
</script>
__________________
--

ngibsonau

Reply With Quote
  #3  
Old March 24th, 2003, 03:03 AM
ralphuk100's Avatar
ralphuk100 ralphuk100 is offline
meester luva luva
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Posts: 2,649 ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 20 h 52 m 29 sec
Number of bans: 1
Reputation Power: 19
Send a message via MSN to ralphuk100
thankyou. That works good.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > changing time locale.....


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway