news.digitalmars.com server has a wrong date

Jonathan M Davis jmdavisProg at gmx.com
Thu Oct 11 17:27:42 PDT 2012


On Friday, October 12, 2012 02:04:33 Andrej Mitrovic wrote:
> On 10/12/12, Andrej Mitrovic <andrej.mitrovich at gmail.com> wrote:
> > On 10/11/12, Jacob Carlborg <doob at me.com> wrote:
> >> I've seen several messages from the future in the web front end:
> > It's an "optimization" :P
> > 
> > https://github.com/CyberShadow/DFeed/blob/dd12d4e23510ec13ef194b3cf858eb12
> > cfb4cf5f/web.d#L1831
> Ah no I'm wrong, I thought it said duration < dur!"seconds"(1). Quite
> curious how duration can end up being less than 0.

Easy. It's negative. For instance, if you subtract now from tomorrow, the 
result would be negative. So, if the code is subtracting the current time from 
some other time, and the result is negative, then the other time is in the 
future as that line indicates.

- Jonathan M Davis


More information about the Digitalmars-d-announce mailing list