Announcement

Collapse
No announcement yet.

How does it do automatic DST detection ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How does it do automatic DST detection ?

    Just curious, how does vBulletin do automatic DST detection ?

    Does it have a table with all DST changes ?

  • #2
    It's this code in the footer template:

    PHP Code:
    <!-- auto DST correction code -->
    <
    form action="profile.php?do=dst" method="post" name="dstform">
     <
    input type="hidden" name="s" value="$session[sessionhash]/>
     <
    input type="hidden" name="do" value="dst" />
    </
    form>
    <
    script type="text/javascript">
    <!--
     var 
    tzOffset $bbuserinfo[timezoneoffset] + $bbuserinfo[dstonoff];
     var 
    utcOffset = new Date().getTimezoneOffset() / 60;
     if (
    Math.abs(tzOffset utcOffset) == 1)
     { 
    // Dst offset is 1 so its changed
      
    document.forms.dstform.submit();
     }
    //-->
    </script>
    <!-- / 
    auto DST correction code --> 
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment


    • #3
      Ohh, cool. So it takes _my_ timezone, i.e. from the user's computer.
      Thanks !

      Comment


      • #4
        Yes... It compares the time on your computer with the offsets and DST settings on your user account. If they do not match, it makes the appropriate changes.
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud demonstration site.
        vBulletin 5 API - Full / Mobile
        Vote for your favorite feature requests and the bugs you want to see fixed.

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        X