use shells SECONDS when date does not support nanoseconds, fix #2870