Thanks Chris. The problem I&#39;m having is creating the $string to begin with. I&#39;ve been banging my head on this all day today reading cpan, so it&#39;s probably something very obvious I&#39;m now too toasted to see... This does look like what I&#39;ll need to do.<br>
<br><div class="gmail_quote">On Feb 1, 2008 3:57 PM, Chris Radcliff &lt;<a href="mailto:chris_radcliff@mac.com">chris_radcliff@mac.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Mark,<br><br>There may be a DateTime formatter module that includes your particular<br>format. For example:<br><br><a href="http://search.cpan.org/%7Eschubiger/DateTime-Format-Natural-0.66/lib/DateTime/Format/Natural.pm" target="_blank">http://search.cpan.org/~schubiger/DateTime-Format-Natural-0.66/lib/DateTime/Format/Natural.pm</a><br>
<br>There are many to choose from, so you might want to try a few and see<br>which one does the best (and possibly fastest) job. Each one will let<br>you go straight from a string to a DateTime object:<br><br>my $parser = DateTime::Format::Natural-&gt;new();<br>
my $dt = $parser-&gt;parse_datetime($date_string);<br><br>...and from there you can use DateTime functions as you described.<br>Hope that helps.<br><br>Cheers,<br><font color="#888888">~chris<br></font><div><div></div><div class="Wj3C7c">
<br>On Feb 1, 2008, at 3:42 PM, Mark Schoonover wrote:<br><br>&gt; Good Afternoon PMs!<br>&gt;<br>&gt; I&#39;m trying to convert from UTC to various US timezones. The time<br>&gt; data is recorded in UTC in a CSV file. What I need to do is convert<br>
&gt; that time to the correct US timezone, plus keep in my daylight<br>&gt; savings time. I&#39;ve looked at DateTime, and it will do what I need,<br>&gt; but I&#39;m missing something basic. My time is not broken out by hms<br>
&gt; seperately, but instead is recorded 00:00 in one field, and mm/dd/<br>&gt; yyyy in another. I&#39;ve played around with DateTime, which has an<br>&gt; is_dst method, but I have no idea how to put the date and time into<br>
&gt; the correct format, and have it create a DateTime object so I can<br>&gt; convert to the correct timezone.<br>&gt;<br>&gt; Any ideas?<br>&gt;<br>&gt; TIA<br>&gt;<br>&gt; --<br>&gt; Mark Schoonover, CMDBA<br></div></div>
</blockquote></div><br><br clear="all"><br>-- <br>Mark Schoonover, CMDBA<br><a href="http://www.linkedin.com/in/markschoonover">http://www.linkedin.com/in/markschoonover</a><br><a href="http://marksitblog.blogspot.com">http://marksitblog.blogspot.com</a><br>
<a href="mailto:mark.schoonover@gmail.com">mark.schoonover@gmail.com</a><br><br>