Updated agentstats code
to use current date