<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div style="RIGHT: auto"><VAR id=yui-ie-cursor></VAR>Hallo Mongers, </div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">habt Ihr (am Sonntag :-) Erfahrung mit der Kombination Windows + Sommerzeit + stat() gemacht? </div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">Bei mir (Win XP SP3, Active Perl v5.12.4) springt im Explorer die Speicherzeit der Dateien um eine Stunde, wenn ich Sommerzeit aus- und einschalte. Ist noch lustig. </div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">Weniger lustig finde ich, dass in Perl die Abfrage der modification time in stat abhängig vom Sommerzeit-Flag ist, obwohl die <STRONG style="RIGHT: auto">Epoch</STRONG> zurueckgegeben wird (mein erster Post mit Code, Bitte um Nachsicht für mangelnde Professionalität): </div>
<div style="RIGHT: auto"> </div>
<BLOCKQUOTE style="RIGHT: auto; MARGIN-RIGHT: 0px" dir=ltr>
<div style="RIGHT: auto"><FONT size=2 face="Courier New, courier, monaco, monospace, sans-serif">#c:/perl/bin/perl<BR>warn "Effect on Windows only?" unless $^O=~/WIN/i;</FONT></div>
<div style="RIGHT: auto"><FONT size=2 face="Courier New"></FONT> </div>
<div style="RIGHT: auto"><FONT size=2 face="Courier New, courier, monaco, monospace, sans-serif">my $epoch = (stat $0)[9]; # modification time  <BR>print "Epoch of $0 is $epoch. \n";</FONT></div>
<div style="RIGHT: auto"><FONT size=2 face="Courier New"></FONT> </div>
<div style="RIGHT: auto"><FONT size=2 face="Courier New, courier, monaco, monospace, sans-serif">print "Please toggle Summertime (e.g. by using the windows GUI)\n";<BR>(<>);</FONT></div>
<div style="RIGHT: auto"><FONT size=2 face="Courier New"></FONT> </div>
<div style="RIGHT: auto"><FONT size=2 face="Courier New, courier, monaco, monospace, sans-serif">my $epoch_toggled = (stat $0)[9]; <BR>print "Epoch of $0 is $epoch_toggled. \n";</FONT></div>
<div style="RIGHT: auto"><FONT size=2 face="Courier New"></FONT> </div>
<div style="RIGHT: auto"><FONT size=2 face="Courier New, courier, monaco, monospace, sans-serif">die "You have to change the Summertime flag!" unless $epoch != $epoch_toggled; <BR>printf "You changed the Summertime flag to >%s< (dt = %ds).\n", <BR>       $epoch_toggled>$epoch ? "ON" : "OFF", $epoch_toggled - $epoch;<BR></FONT></div></BLOCKQUOTE>
<div style="RIGHT: auto">-> Als Datei speichern und aufrufen, verwendet das Speicherdatum der Datei. Leider stand mir der CMD-Befehl "TZ" nicht zur Verfügung, mit dem Zeitzonen im Script etc. geändert werden können, so dass man hier das Sommerzeit-Flag manuell ein/ausschalten muss. </div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">Bei mir sieht das so aus: </div>
<BLOCKQUOTE style="RIGHT: auto; MARGIN-RIGHT: 0px" dir=ltr>
<div style="RIGHT: auto"><FONT size=2 face="Courier New, courier, monaco, monospace, sans-serif">D:\p\src\learning>perl 31_win_dst_stat.pl<BR>Epoch of 31_win_dst_stat.pl is 1332710328.<BR>Please toggle Summertime (e.g. by using the windows GUI)</FONT></div>
<div style="RIGHT: auto"><FONT size=2 face="Courier New, courier, monaco, monospace, sans-serif">Epoch of 31_win_dst_stat.pl is 1332713928.<BR>You changed the Summertime flag to >ON< (dt = 3600s).</FONT></div></BLOCKQUOTE>
<div style="RIGHT: auto">Ich bin bei einem Tool auf die Verwendung der Speicherzeit angewiesen und verwende mal Dateien, die während der Sommerzeit entstanden sind, mal Dateien ohne Sommerzeit. Der Effekt bricht mein Tool.  </div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">Mache ich etwas falsch (außer dass ich MS Windows verwende)?</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">Grüße</div>
<div style="RIGHT: auto">Jürgen</div>
<div style="RIGHT: auto"> </div></div></body></html>