- or download this
day 1 | day 2
---- |
...
--|----
|------
| -------
- or download this
my @now = localtime;
my $hour = $now[2];
...
$daychange = timelocal(@now);
# add one days seconds if running before midnight
$daychange += 86400 if $hour > 2;
- or download this
$sum{ $daystamp <= $stoptime ? 'first' : 'second' } += $linesum;