Skip to content

Instantly share code, notes, and snippets.

@M1ke
M1ke / TstampTask.php
Created May 8, 2012 14:06
Phing Timestamp: The tstamp task returns a PHP warning if the default timezone isn't set in the install. Rather than suppressing warnings, this adds the timezone setting, and additionally checks that the function exists so Phing doesn't break
<?php
/*
* $Id: TstampTask.php 557 2009-08-29 13:54:38Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT