/**
* date.php
*
- * Copyright (c) 1999-2002 The SquirrelMail Project Team
+ * Copyright (c) 1999-2003 The SquirrelMail Project Team
* Licensed under the GNU GPL. For full terms see the file COPYING.
*
* Takes a date and parses it into a usable format. The form that a
* $Id$
*/
-require_once( '../functions/constants.php' );
+require_once(SM_PATH . 'functions/constants.php');
/* corrects a time stamp to be the local time */
function getGMTSeconds($stamp, $gmt) {
case 'KST':
$gmt = '+0900';
break;
- break;
}
if (substr($gmt, 0, 1) == '-') {
* Since the day of week is optional, this check is needed.
*/
+ /* validate zone before we uses strtotime */
+ if (isset($dateParts[6]) && $dateParts[6] && $dateParts[6]{0} != '(') {
+ $dateParts[6] = '('.$dateParts[6].')';
+ }
$string = implode (' ', $dateParts);
if (! isset($dateParts[4])) {
if (intval(trim($dateParts[0])) > 0) {
return getGMTSeconds(strtotime($string), $dateParts[4]);
}
-
return getGMTSeconds(strtotime($string), $dateParts[5]);
}