In blackhole physics, the second law of thermodynamics is generally valid
whether the blackhole is a static or a non-static one. Considering the universe
as a thermodynamical system the second law of blackhole 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 or filled with perfect fluid and
holographic dark energy in two cases. Thus considering entropy to be an
arbitrary function of the area of the event-horizon, we have tried to find the
conditions and the restrictions over the scalar field and equation of state for
the validity of the GSLT and both in quintessence-era and in phantom-era in
scalar tensor theory.Comment: 8 page