Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - MOD: Synchronize your Watches
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

MOD: Synchronize your Watches

 Post Reply Post Reply
Author
Joeee View Drop Down
Newbie
Newbie
Avatar

Joined: 05 August 2003
Status: Offline
Points: 33
Post Options Post Options   Thanks (0) Thanks(0)   Quote Joeee Quote  Post ReplyReply Direct Link To This Post Topic: MOD: Synchronize your Watches
    Posted: 20 November 2003 at 4:52pm

I'm not allowed to post this to the mods group, so I'll post it here... until someone wants to add me to the mods group.

I just tweaked the time off set language on the registration page (register.asp) to be more intuitive. You can now pick the time that's closest to your local time and the rest happens behind the scenes.

Here's the tweaks to the language file (language_file_inc.asp):

Const strTxtTimezone = "Which time is closest to your current time?"
Const strTxtPresentServerTimeIs = "From now on, our system clock will be set to your local time."

Here's the code from the form:

%></span></td>
         <td width="50%" valign="top" class="text" background="<% = strTableBgImage %>">
       <select name="serverOffSetHours"><%

 Dim yourdate
 'Create list of time off-set
 For lngLoopCounter = -24 to 24
  yourdate=DateAdd("h", lngLoopCounter,dtmServerTime)
  Response.Write(VbCrLf & "        <option value=""" & lngLoopCounter & """")
  If intTimeOffSet = lngLoopCounter Then Response.Write("selected")
  Response.Write(">" & WeekdayName(Weekday(yourdate)) & " at " & TimeFormat(yourdate, saryDateTimeData) & "</option>")
 Next
       
%>

And, here's the code from the "read in members details" section:

         if CInt(Request.Form("serverOffSetHours")) >= 0 then strTimeOffSet="+"
         if CInt(Request.Form("serverOffSetHours")) < 0 then strTimeOffSet="-"
         intTimeOffSet = CInt(ABS(Request.Form("serverOffSetHours")))

Back to Top
Joeee View Drop Down
Newbie
Newbie
Avatar

Joined: 05 August 2003
Status: Offline
Points: 33
Post Options Post Options   Thanks (0) Thanks(0)   Quote Joeee Quote  Post ReplyReply Direct Link To This Post Posted: 20 November 2003 at 6:14pm

Oops. One small tweak...

The following line:

Response.Write(">" & WeekdayName(Weekday(yourdate)) & " at " & TimeFormat(yourdate, saryDateTimeData) & "</option>")

Should be changed to:

Response.Write(">" & WeekdayName(Weekday(DateFormat(yourdate,saryDateTimedata))) & " at " & TimeFormat(yourdate,sarydatetimedata) & "</option>")

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.