Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

DATETIME Timezones in asp

Posted on 2007-10-19
5
Medium Priority
?
2,283 Views
Last Modified: 2012-06-21
Hi Experts,

Is there anyway in classic ASP that I can retrieve the time for a timezone, for example Central US Time or GMT without relying on the server time or the client pc time... if so, how?

if not, is there anyway to be able to tell what timezone the server time is set to...e.g. Central US Time or GMT..

Is there a chance that I'm missing something in the workings of ASP code, if so please shed some light on how DATETIME works.

Thank you
0
Comment
Question by:claracruz
5 Comments
 
LVL 16

Expert Comment

by:golfDoctor
ID: 20108863
You'd need to know the timezone your server is in.  Then you need to write a function to change the time for each timezone.  You would also need to have the user enter, and you store their time zone, just like EE does.

0
 
LVL 20

Accepted Solution

by:
Gawai earned 1000 total points
ID: 20109348
Hello claracruz,
as golfDoctor already said, u will have to know the server date/time to do that.
later you can use function like adddate()

Response.Write "Server Date/Time : " & now()
Response.Write " | Dubai: " & dateAdd ("h",8,now())
Response.Write " | India: " & dateAdd ("n",570,now())
0
 
LVL 4

Expert Comment

by:swinslow
ID: 20109942
I have a utility script that will help you determine the timezone that your server is in then adjust Date/Times in your scripts  to your timezone (or any other timezone)  http://www.sorenwinslow.com/TimeZones.asp
0
 
LVL 20

Expert Comment

by:Gawai
ID: 20110939
Glad to help you. Thanks for the A
0
 

Expert Comment

by:deross
ID: 33153748
I am using server time.  I want the "EST" or "EDT" text to update dynamically based on whether it is daylight savings time or standard time.  How do I determine whether it is daylight savings time or standard time?
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question