<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    On 01/06/14 00:36, Joris Van den Bogaert wrote:
    <blockquote cite="mid:8B420C0278CD45B6A88ADD70FB376A0E@WhizzitPC"
      type="cite">
      <div dir="ltr">
        <div style="font-size: 10pt; font-family: 'Arial'; color: rgb(0,
          0, 0);">
          <div>Hello,</div>
          <div>&nbsp;</div>
          <div>I'm investigating how to deal with timezones for an
            application that will get to</div>
          <div>processes billions of timestamped events, generated in
            just about any part of the world.</div>
          <div>Timestamps are in local time (without timezone, only
            post- and other codes) and we need </div>
          <div>them in UTC time.&nbsp; Money is involved, so it is of
            critical importance that intervals </div>
          <div>between events are calculated correctly.</div>
          <div>&nbsp;</div>
          <div>There's two steps involved in this:</div>
          <div>&nbsp;</div>
          <div>- given some geo data and some lookup tables from a
            database like geopostcodes.com, determine the timezone id</div>
          <div>- convert to UTC using the latest Time Zone Database</div>
        </div>
      </div>
    </blockquote>
    Matching geo data to a timezone is a bit fuzzy. On the <br>
    other hand, you state that correct calculation is critical.<br>
    <br>
    <br>
    <br>
    <blockquote cite="mid:8B420C0278CD45B6A88ADD70FB376A0E@WhizzitPC"
      type="cite">
      <div dir="ltr">
        <div style="font-size: 10pt; font-family: 'Arial'; color: rgb(0,
          0, 0);">
          <div>2) Do rules from the past ever change?&nbsp; In other words,
            can we assume that a recalculation of a past </div>
          <div>local date to a UTC date will always yield the same
            result with newer versions of the TZ database?&nbsp; </div>
          <div>If so, is this a common thing and would one then
            recommend saving the TZ database version with </div>
          <div>which the conversion was performed along with the UTC
            date?</div>
        </div>
      </div>
    </blockquote>
    Yes. If new data is discovered and it turns out the previous rule <br>
    was wrong, it is updated. The new one will (hopefully) be more <br>
    accurate, but there will be a difference from converting with the <br>
    previous version.<br>
    Also note that the applicable timezone could change.<br>
    <br>
    You may know more than us how likely it is that the information <br>
    about the period you are treating wasn't accurate.
    <div dir="ltr">
      <div style="font-size: 10pt; font-family: 'Arial'; color: rgb(0,
        0, 0);">
        <div><br>
          &nbsp;</div>
      </div>
    </div>
    Now I'm thinking that perhaps you aren't working on historic <br>
    records but with future ones, in which case it's very likely that<br>
    tz will be right (but in that case why not store them in UTC
    directly?)<br>
    &#8230; excluding the cases where a Government decides to change time <br>
    and tz/your team is not able to provide/install the new rules before
    <br>
    the change. :/<br>
    <br>
    <br>
    <br>
  </body>
</html>