in reply to Re^2: epoch reduction
in thread epoch reduction

I didn't see anything in the problem statement about local time

I do not consider "sometimes 8pm to 8pm and sometimes 7pm to 7pm" to be the default definition of "day".

I would have thought that if someone says today without qualification, that means midnight to midnight where he is observing. Even if every day is not the same length. I don't know why you're assuming he wants the date somewhere else in the world.

But yes, any time zone's day could be used by the solution I posted.

Replies are listed 'Best First'.
Re^4: epoch reduction
by Marshall (Canon) on Apr 22, 2012 at 08:06 UTC
    Almost all of the log files I work with are in UTC (GMT) and from multiple time zones.
    So the question of "what means a new day" can be relevant.
    If the OP's system is just single time zone and doesn't have to deal with this maybe +10 hour or whatever difference, OK.

    I did like your solution, the minor quibble is about time zone stuff.