Some think that David penned this psalm at the time of Absalom's rebellion; others that Daniel, Nehemiah, or some other prophet, penned it for the use of the church, when it was in captivity in Babylon, because it seems to speak of the ruin of Zion and of a time set for the rebuilding of it, which Daniel understood by books, Dan. ix. 2. Or perhaps the psalmist was himself in great affliction, which he complains of in the beginning of the psalm, but (as in Ps. lxxvii. and elsewhere) he comforts himself under it with the consideration of God's eternity, and the church's prosperity and perpetuity, how much soever it was now distressed and threatened. But it is clear, from the application of ver. 25, 26, to Christ (Heb. i. 10-12), that the psalm has reference to the days of the Messiah, and speaks either of his affliction or of the afflictions of his church for his sake. In the psalm we have, I. A sorrowful complaint which the psalmist makes, either for himself or in the name of the church, of great afflictions, which were very pressing, ver. 1-11. II. Seasonable comfort fetched in against these grievances, 1. From the eternity of God, ver. 12, 24, 27. 2. From a believing prospect of the deliverance which God would, in due time, work for his afflicted church (ver. 13-22) and the continuance of it in the world, ver. 28. In singing this psalm, if we have not occasion to make the same complaints, yet we may take occasion to sympathize with those that have, and then the comfortable part of this psalm will be the more comfortable to us in the singing of it.