%@ LANGUAGE = VBScript %> <% 'Option Explicit %> <% ' localDateToUTC ' ' Because we want to display the correct client-side time and because ' the date string is not necessarily in a form that we can process (it's ' locale specific now) and it is currently in GMT, we need ' to do a manual format. ' ' The goal is to get something that is parsable by javascript Date.parse() ' Dim MONTHS Dim DAYS MONTHS = Array( "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ) DAYS = Array( "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ) function localDateToUTC( theDate ) On Error Resume Next Dim strTheDate Dim nTimePart strTheDate = DAYS(Weekday( theDate, vbSunday ) - 1 ) & ", " & CStr( Day(theDate) ) _ & " " & MONTHS(Month(theDate) - 1) & " " & Year(theDate) & " " nTimePart = Hour(theDate) if nTimePart < 10 then strTheDate = strTheDate & "0" end if strTheDate = strTheDate & nTimePart & ":" nTimePart = Minute(theDate) if nTimePart < 10 then strTheDate = strTheDate & "0" end if strTheDate = strTheDate & nTimePart & ":" nTimePart = Second(theDate) if nTimePart < 10 then strTheDate = strTheDate & "0" end if strTheDate = strTheDate & nTimePart & " GMT" localDateToUTC = strTheDate end function %>