Abstract
In black-hole physics, the second law of thermodynamics is generally valid whether the black hole is a static or a non-static one. Considering the universe as a thermodynamical system the second law of black-hole dynamics extends to the non-negativity of the sum of the entropy of the matter and the horizon, known as generalized second law of thermodynamics (GSLT). Here, we have assumed the universe to be bounded by the event horizon where Bekenstein entropy-area relation and Hawking-temperature are not applicable. Thus considering entropy to be an arbitrary function of the area of the event horizon, we have tried to find the nature of the entropy function for the validity of the GSLT both in the quintessence era and in the phantom era. Finally, some graphical representation of the entropy function has been presented.