Fixed usage of date() instead of gmdate()