add a couple of bugs about posix compliance and the use of getopts
[monkeysphere.git] / src / common
index 51b04708e1e34ca13dbc4d9d4d0a591211200c4d..f6000d31d223d9245c967d6bc0324575cc84a1ca 100644 (file)
@@ -147,7 +147,7 @@ advance_date() {
     local shortunits
 
     # try things the GNU way first 
-    if date -d "$number $longunits" "$format" >&/dev/null ; then
+    if date -d "$number $longunits" "$format" >/dev/null 2>&1; then
        date -d "$number $longunits" "$format"
     else
        # otherwise, convert to (a limited version of) BSD date syntax: