<meta http-equiv="CONTENT-TYPE" content="text/html; charset=utf-8">
        <title></title>
        <meta name="GENERATOR" content="OpenOffice.org 3.0  (Linux)">
        <style type="text/css">
        <!--
                @page { margin: 2cm }
                P { margin-bottom: 0.21cm }
        -->
        </style>

<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">Senhores,</font></p>
<p style="margin-bottom: 0cm;"><br>
</p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">Vou
postar algumas informações, para que possam entender o problema que
estou enfrentando. No final do texto, faço a pergunta.</font></p>
<p style="margin-bottom: 0cm;"><br>
</p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">-----------------------------------------------------------------------------------------------------------------------------</font></p>
<p style="margin-bottom: 0cm;"><br>
</p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">Um
determinado log gerado pelo squid:</font></p>
<p style="margin-bottom: 0cm;"><br>
</p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">1257424994.520
1 10.10.2.17 TCP_DENIED/407 1808 GET <a href="http://www.site.com/">http://www.site.com/</a> - NONE/-
text/html</font></p>
<p style="margin-bottom: 0cm;"><br>
</p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">-----------------------------------------------------------------------------------------------------------------------------</font></p>
<p style="margin-bottom: 0cm;"><br>
</p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">Conversão
do campo time do log acima:</font></p>
<p style="margin-bottom: 0cm;"><br>
</p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">#
date -d @1257424994.520<br>Thu Nov 5 10:43:14 BRST 2009</font></p>
<p style="margin-bottom: 0cm;"><br>
</p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">-----------------------------------------------------------------------------------------------------------------------------</font></p>
<p style="margin-bottom: 0cm;"><br>
</p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">Registro
do log acima, importado para o MySQL, utilizando scripts em Perl com
módulo Date::Calc:</font></p>
<p style="margin-bottom: 0cm;"><br>
</p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">usuario
| 2009-11-05 | 09:43:21 | 153642 | 7357 | 1 | 200 | 19146 |
<a href="http://www.site.com/">http://www.site.com/</a> | 10.10.2.17</font></p>
<p style="margin-bottom: 0cm;"><br>
</p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">-----------------------------------------------------------------------------------------------------------------------------
</font>
</p>
<p style="margin-bottom: 0cm;"><br>
</p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">A
hora reportada pelo comando date está correta. Podemos observar que
a hora registrada no MySQL está com atraso de 1h.</font></p>
<p style="margin-bottom: 0cm;"><br>
</p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">-----------------------------------------------------------------------------------------------------------------------------
</font>
</p>
<p style="margin-bottom: 0cm;"><br>
</p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">Já
executei o script <a href="http://horario.verao.sh">horario.verao.sh</a> descrito abaixo:</font></p>
<p style="margin-bottom: 0cm;"><br>
</p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">#
cat <a href="http://horario.verao.sh">horario.verao.sh</a> 
</font></p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">/bin/cp
/etc/localtime /etc/localtime.`date +%Y%m%d`
</font></p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">echo
“Rule Brazil 2009 only – Oct 18 00:00 1 S” >
/usr/share/zoneinfo/verao20092013.zic
</font></p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">echo
“Rule Brazil 2010 only – Feb 21 00:00 0 -” >>
/usr/share/zoneinfo/verao20092013.zic
</font></p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">echo
“Rule Brazil 2010 only – Oct 17 00:00 1 S” >>
/usr/share/zoneinfo/verao20092013.zic
</font></p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">echo
“Rule Brazil 2011 only – Feb 20 00:00 0 -” >>
/usr/share/zoneinfo/verao20092013.zic
</font></p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">echo
“Rule Brazil 2011 only – Oct 16 00:00 1 S” >>
/usr/share/zoneinfo/verao20092013.zic
</font></p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">echo
“Rule Brazil 2012 only – Feb 26 00:00 0 -” >>
/usr/share/zoneinfo/verao20092013.zic
</font></p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">echo
“Rule Brazil 2012 only – Oct 21 00:00 1 S” >>
/usr/share/zoneinfo/verao20092013.zic
</font></p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">echo
“Rule Brazil 2013 only – Feb 17 00:00 0 -” >>
/usr/share/zoneinfo/verao20092013.zic
</font></p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">echo
“” >> /usr/share/zoneinfo/verao20092013.zic
</font></p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">echo
“Zone hv20092013 -3:00 Brazil BR%sT” >>
/usr/share/zoneinfo/verao20092013.zic
</font></p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">/usr/sbin/zic
/usr/share/zoneinfo/verao20092013.zic
</font></p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">/bin/cp
/usr/share/zoneinfo/hv20092013 /etc/localtime
</font></p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">zdump
-v /etc/localtime
</font></p>
<p style="margin-bottom: 0cm;"><br>
</p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">-----------------------------------------------------------------------------------------------------------------------------
</font>
</p>
<p style="margin-bottom: 0cm;"><br>
</p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">Respota
do comando zdump:</font></p>
<p style="margin-bottom: 0cm;"><br>
</p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">[root@server
~]# zdump -v /etc/localtime
</font></p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">/etc/localtime
 Fri Dec 13 20:45:52 1901 UTC = Fri Dec 13 17:45:52 1901 BRT isdst=0
gmtoff=-10800
</font></p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">/etc/localtime
 Sat Dec 14 20:45:52 1901 UTC = Sat Dec 14 17:45:52 1901 BRT isdst=0
gmtoff=-10800
</font></p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">/etc/localtime
 Sun Oct 18 02:59:59 2009 UTC = Sat Oct 17 23:59:59 2009 BRT isdst=0
gmtoff=-10800
</font></p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">/etc/localtime
 Sun Oct 18 03:00:00 2009 UTC = Sun Oct 18 01:00:00 2009 BRST isdst=1
gmtoff=-7200
</font></p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">/etc/localtime
 Sun Feb 21 01:59:59 2010 UTC = Sat Feb 20 23:59:59 2010 BRST isdst=1
gmtoff=-7200
</font></p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">/etc/localtime
 Sun Feb 21 02:00:00 2010 UTC = Sat Feb 20 23:00:00 2010 BRT isdst=0
gmtoff=-10800
</font></p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">/etc/localtime
 Mon Jan 18 03:14:07 2038 UTC = Mon Jan 18 00:14:07 2038 BRT isdst=0
gmtoff=-10800
</font></p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">/etc/localtime
 Tue Jan 19 03:14:07 2038 UTC = Tue Jan 19 00:14:07 2038 BRT isdst=0
gmtoff=-10800
</font></p>
<p style="margin-bottom: 0cm;"><br>
</p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">-----------------------------------------------------------------------------------------------------------------------------
</font>
</p>
<p style="margin-bottom: 0cm;"><br>
</p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">Como
podem ver na resposta abaixo, do comando date, o sistema não está
considerando que estamos no horário de verão (BRST).</font></p>
<p style="margin-bottom: 0cm;"><br>
</p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">[root@server
~]# date
</font></p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">Fri
Nov  6 10:54:48 BRST 2009
</font></p>
<p style="margin-bottom: 0cm;"><br>
</p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">Não
deveria constar BRDT no lugar de BRST?</font></p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">Será
que ao corrigir este problema, a data dos logs do proxy  no MySQL
também ficará correta nas próximas importações?</font></p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1">Obrigado!</font></p>
<p style="margin-bottom: 0cm;">André<br>
</p>
<p style="margin-bottom: 0cm;"><font style="font-size: 8pt;" size="1"></font><br></p>