<?xml version="1.0" encoding="windows-1252"?>
<node id="966103" title="Re: epoch reduction" created="2012-04-20 02:39:40" updated="2012-04-20 02:39:40">
<type id="11">
note</type>
<author id="704949">
fullermd</author>
<data>
<field name="doctext">
&lt;p&gt;
Assuming that by 'epoch time' you mean &lt;c&gt;time_t&lt;/c&gt;, you don't need to convert to some other form.  Since time_t is a lying liar and pretends every day is exactly 86400 seconds long, you can just do some &lt;c&gt;/&lt;/c&gt;'s and &lt;c&gt;%&lt;/c&gt;'s to find which fit in the same day and the highest for the day.
&lt;/p&gt;

&lt;p&gt;(of course, because of the undefined behavior around leap seconds, you can't &lt;em&gt;really&lt;/em&gt; be sure whether &lt;c&gt;% 86_400 == 0&lt;/c&gt; is actually 00:00:00 or 23:59:60, but I think most systems repeat the 86399th instead.  And since you can't tell anyway, it probably doesn't matter)&lt;/p&gt;</field>
<field name="root_node">
966022</field>
<field name="parent_node">
966022</field>
</data>
</node>
