On Sun, Mar 27, 2011 at 06:04:37PM -0600, Bob Proulx wrote: > Thank you for your bug report. However I this is not a bug in date > but a misunderstanding of how relative times and DST interact. > ... > The string `tomorrow' is worth one day in the future (equivalent to > `day'), the string `yesterday' is worth one day in the past (equivalent > to `day ago'). > > So 'yesterday' or '24 hours ago' are equivalent. These are exactly 24 > hours ago or 86400 seconds. This is a critical point in your problem.
I see the problem, but IMO, the definition of yesterday should be changed or there should be a new definition. What about defining new units: 'calday', 'calyesterday', 'caltomorrow'? For example, $(date -d '1 calday ago' '+%F')? These would count actual calendar days rather than relative time (in units of 24 hours)? Yes I know there is a work around in the doc you provided (thanks for that). Heikki Orsila
