---
title: "Happy echo date('Y')"
date: 2013-01-02T12:41:04Z
modified: 2020-05-13T11:14:57Z
permalink: "https://dogwonder.co.uk/2013/01/happy-echo-datey/"
type: post
status: publish
excerpt: ""
wpid: 2276
categories:
  - Code
---

It’s at times like these that I am very happy I declare copyright notices on the sites I manage using the php method for echoing the year.

Copyright © Saves a lot of time and panic after noticing a site you built years ago looks somewhat out of date.

**Update:** via Maarten Jacobs ([@MaartenJJ](http://twitter.com/MaartenJJ)) it’s a good idea to set the timezone to ensure it displays correctly for the users location via [date\_default\_ timezone\_set()](http://php.net/manual/en/function.date-default-timezone-set.php). Thanks Maarten