<div dir="ltr">FYI here is the project I used in the talk.<div><br></div><div>Julian</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 11, 2015 at 7:26 AM, G. Wade Johnson via Houston <span dir="ltr"><<a href="mailto:houston@pm.org" target="_blank">houston@pm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">After the discussion on Julian's time series code, I dug out some<br>
pieces of DateTime logic I've used. These may be useful for some.<br>
<br>
  my $LocalTZ = DateTime::TimeZone->new( time_zone => 'local' );<br>
<br>
This variable can be passed any time DateTime needs a time zone.<br>
Obviously, you can build other DateTime::TimeZone objects for other<br>
time zones that you need.<br>
<br>
  $dt->add( days => 1 );       # Move forward one day<br>
  $dt->subtract( days => 1 );  # Move backward one day<br>
<br>
These change the $dt object, but other than that are pretty useful. See<br>
DateTime::Duration for other arguments you can use.<br>
<br>
I haven't tried it, but<br>
<br>
  $dt->truncate( to => 'day' );<br>
<br>
Should truncate the $dt to midnight. Other values for 'to' truncate at<br>
other spots.<br>
<br>
HTH,<br>
G. Wade<br>
<span class="HOEnZb"><font color="#888888">--<br>
Results are what you wanted, consequences are what you got.<br>
                                                 -- Michael VanDusen<br>
_______________________________________________<br>
Houston mailing list<br>
<a href="mailto:Houston@pm.org">Houston@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/houston" rel="noreferrer" target="_blank">http://mail.pm.org/mailman/listinfo/houston</a><br>
Website: <a href="http://houston.pm.org/" rel="noreferrer" target="_blank">http://houston.pm.org/</a><br>
</font></span></blockquote></div><br></div>