What's Up - Future Topic...

 We'll have to think of something over the winter: Suggestions? Send them to: Me

'Off the beaten path' places you should visit:

Great places to eat:

Quick trips to unwind after work:
1. Prescott for shrimp
2. Baldwin - Klinker's Korner
3. 

 


 

 

 

  **************************************
Name: Digital Clock, Display local time and UTC/GMT time
Description: I wanted to put a simple clock together for my website to display
current local time from the server and calculate UTC (Greenwich Mean).
UTC time is used by Ham Radio Operators in their contact logs.
Thats why I coded this. It is all pretty simple, but a pretty good
example of how to format dates and times. Also handy for anyone trying
to deal with time zones. I hope someone finds this useful.
By: BenjaminTownsend
Inputs:None Returns:None Assumes:None Side Effects:None
vb/scripts/ShowCode.htm for details. Do whatever you want with this code! I couldn't find something premade out there to do exactly what I needed so I created my own I used this file as an include from another page. some of this was gathered from other sources such as code samples and articles. dim todaysDate dim ststemtime dim addhours dim UTCtime DIM UTCdate dim CurrSeconds sets variables to current server time todaysDate=now() systemtime = now() 'adjusts from current server time zone to UTC time from EST to UTC is 4 hours This code doesn't take into account daylight savings time changes. addhours = 4 'sets UTC time to the specified amount different from server. UTCtime = dateadd("h",addhours,systemtime) 'checks to see if UTC date is same date or different date, if it's differnt it adjusts for it. This won't work correctly ' if addhours is negative. if hour(UTCtime) < hour(systemtime) then 'then UTC date is tommorow UTCdate = todaysdate + 1 else UTCdate = todaysDate end if 'pretty formatting stuff %> <% 'formats the seconds display so that it shows as 04 instead of just 4 when less than 10 seconds. if Second(now) < 10 then CurrSeconds = "0" & Second(now) else CurrSeconds = Second(now) end if more pretty formatting and displaying the two times and dates. %>

UTC

New York, NY, USA

<% response.write FormatDateTime(UTCtime,4) & ":" & CurrSeconds %>

<% response.write FormatDateTime(Systemtime,3)%>

<% Response.write FormatDateTime(UTCDate,1) %>

<% Response.write FormatDateTime(todaysDate,1) %>