jsTimezoneDetect / index.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html>

<head>
  <title>Automatic time zone detection using JavaScript</title>
  <!-- 
  Script by Josh Fraser (http://www.onlineaspect.com)
  Continued by jon at pageloom dot com as jsTimezoneDetect.
  Open source on bitbucket.org.
  -->
  <style type="text/css">
  body {
    font-family: helvetica, sans-serif;
    background-color: #555;
    color: #fff;
    text-shadow:1px 1px 0px #000;
    padding: 0px;
    margin: 0px;
  }
  
  div#content {
    background-color: #333;
    width: 100%;
    border-top: 1px solid #fff;
    border-bottom: 1px solid #fff;
    -box-shadow: 5px 5px 3px #333;
    -moz-box-shadow: 5px 5px 3px #333;
    -webkit-box-shadow: 5px 5px 3px #333;
  }
  
  div#content p {
    width: 500px;
    margin-left: auto;
    margin-right: auto;
    padding: 3px 10px 3px 10px;
    text-align: left;
    font-size: 20px;
    line-height: 30px;
    font-weight: normal;
  }
  
  div#content p#tz_info {
    display: none;
  }
  
  p.info {
    width: 730px;
    margin-left: auto;
    margin-right: auto;
    font-size: 12px;
    font-weight: normal;
    text-align: right;
    letter-spacing: 1px;
  }
  
  p.instructions {
    width: 520px;
    margin-left: auto;
    margin-right: auto;
    font-size: 13px;
    text-align: left;
    letter-spacing: 1px;
    line-height: 15px;
  }
  
  ul {
    width: 520px;
    margin-left: auto;
    margin-right: auto;
    font-size: 13px;
    letter-spacing: 1px;
    line-height: 17px;
  }
  
  h1 {
    text-align: center;
    margin-bottom: 0px;
  }
  
  h3 {
    width: 550px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 20px;
    margin-bottom: -5px;
  }
  
  h3.omg {
    color: green;
  }
  
  a {
    border-bottom:1px solid #A7A7A7;
    color:#bdf;
    line-height:20px;
    white-space:nowrap;
    text-decoration: none;
  }
  
  a:hover {
    border-color: #000;
  }
  </style>
  <script type="text/javascript" src='detect_timezone.js'></script>
  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
</head>

<body>

<h1>Automatic Timezone Detection Using JavaScript</h3>
<p class="info">This script is open source and hosted as <a href="https://bitbucket.org/pellepim/jstimezonedetect"/>jsTimezoneDetect @ Bitbucket</a>.</p>
<div id="content">
<p id="tz_info"></p>
</div>
<h3>How do I test this script?</h3>
<p class="instructions">To test the detection script, simply change your system timezone and refresh this page. In Chrome you will have to open a new tab for the new timezone to be detected, and Safari needs to be restarted (unfortunately nothing that JavaScript can solve).</p>
<h3>What is the Olson Database?</h3>
<p class="instructions">The Olson database, also known as the <strong>tz database</strong>. Is a public domain collaborative compilation of information about the world's timezones.</p>
<p class="instructions">It is widely used as basis for timezone information in operating systems and software. Most platforms and programming languages have libraries that support it.</p>
<p class="instructions"><a href="http://en.wikipedia.org/wiki/Tz_database">More at Wikipedia!</a></p>
<h3>I don't like the timezone this script gives me!</h3>
<p class="instructions">This script does not do geolocation. It simply picks the most populated timezone among several roughly identical ones.</p>
<p class="instructions">For example, it is impossible to distinguish between different cities in Europe. This script will return Europe/Berlin regardless of where you live in the Central European timezone.</p>
<p class="instructions"><a href="https://bitbucket.org/pellepim/jstimezonedetect/wiki/Detection_List">Click here for the list of timezones this script is able to detect</a>.</p>
<h3>NO CAN HAZ TIMEZONEZ?!?11</h3>
<p class="instructions">If this script fails to correctly determine your timezone, <a href="https://bitbucket.org/pellepim/jstimezonedetect/issues/new">Please report it!</a></p>
<p class="instructions">When you report an issue. Please tell us </p>
<ul>
    <li>what timezone your computer is set to,</li>
    <li>what operating system you use, and</li>
    <li>what browser you use.</li>
</ul>
</body>
</html>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.