cvs: pearweb /include pear-database.php pear-format-html.php

From: Date: Thu, 08 Jul 2004 20:37:52 +0000
Subject: cvs: pearweb /include pear-database.php pear-format-html.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-440@lists.php.net to get a copy of this message
danielc Thu Jul 8 16:37:52 2004 EDT Modified files: /pearweb/include pear-format-html.php pear-database.php Log: * Move make_utc_date() from pear-format-html.php to pear-database.php because it's needed in non-html places too. http://cvs.php.net/diff.php/pearweb/include/pear-format-html.php?r1=1.129&r2=1.130&ty=u Index: pearweb/include/pear-format-html.php diff -u pearweb/include/pear-format-html.php:1.129 pearweb/include/pear-format-html.php:1.130 --- pearweb/include/pear-format-html.php:1.129 Wed Jul 7 18:28:57 2004 +++ pearweb/include/pear-format-html.php Thu Jul 8 16:37:51 2004 @@ -15,7 +15,7 @@ +----------------------------------------------------------------------+ | Authors: | +----------------------------------------------------------------------+ - $Id: pear-format-html.php,v 1.129 2004/07/07 22:28:57 danielc Exp $ + $Id: pear-format-html.php,v 1.130 2004/07/08 20:37:51 danielc Exp $ */ PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'error_handler'); @@ -886,22 +886,6 @@ function hdelim() { return '<hr />'; -} - -/** - * Converts a Unix timestamp to a date() formatted string in the UTC time zone - * - * @param int $ts a Unix timestamp from the local machine. If none - * is provided the current time is used. - * @param string $format a format string, as per http://php.net/date - * - * @return string the time formatted time - */ -function make_utc_date($ts = null, $format = 'Y-m-d H:i \U\T\C') { - if (!$ts) { - $ts = time(); - } - return date($format, $ts - date('Z', $ts)); } ?> http://cvs.php.net/diff.php/pearweb/include/pear-database.php?r1=1.213&r2=1.214&ty=u Index: pearweb/include/pear-database.php diff -u pearweb/include/pear-database.php:1.213 pearweb/include/pear-database.php:1.214 --- pearweb/include/pear-database.php:1.213 Mon Jul 5 13:45:31 2004 +++ pearweb/include/pear-database.php Thu Jul 8 16:37:52 2004 @@ -17,7 +17,7 @@ | Tomas V.V.Cox <cox@php.net> | | Martin Jansen <mj@php.net> | +----------------------------------------------------------------------+ - $Id: pear-database.php,v 1.213 2004/07/05 17:45:31 danielc Exp $ + $Id: pear-database.php,v 1.214 2004/07/08 20:37:52 danielc Exp $ */ require_once 'DB/storage.php'; @@ -2472,6 +2472,22 @@ } return null; } +} + +/** + * Converts a Unix timestamp to a date() formatted string in the UTC time zone + * + * @param int $ts a Unix timestamp from the local machine. If none + * is provided the current time is used. + * @param string $format a format string, as per http://php.net/date + * + * @return string the time formatted time + */ +function make_utc_date($ts = null, $format = 'Y-m-d H:i \U\T\C') { + if (!$ts) { + $ts = time(); + } + return date($format, $ts - date('Z', $ts)); } ?>

« previous php.pear.core (#440) next »