1. Home
  2. Cloud & Dedicated Servers
  3. Scripts and Programming
  4. Active Server Pages (ASP)
  5. How can I adjust the time on my ASP pages to show my local time?

How can I adjust the time on my ASP pages to show my local time?

"The server’s time shows time relative to the Eastern Time Zone. I want the time to be offset to show my local time instead of your time. How can I do that?"

There are a couple ways to do this and you should consult an ASP programming book for different options. One way to do this however is as below:

 code:

Function OffsetTime(xTime,xOffset) xHour = Hour(xTime)+xOffset yTime=Split(xTime,":") yTime(0)=IIf(xHour>23,CStr(xHour-24),CStr(xHour)) OffsetTime = TimeValue(join(yTime,":")) End Function


Content retrieved from: https://support.appliedi.net/kb/a390/how-can-i-adjust-the-time-on-my-asp-pages-to-show-my-local-time.aspx.

Updated on November 11, 2019

Was this article helpful?

Related Articles

Need Support?
Can't find the answer you're looking for? Don't worry we're here to help!
CONTACT SUPPORT