/*=====================================================================*\
|| ###################################################################
|| # Blue Static ISSO Framework
-|| # Copyright ©2002-[#]year[#] Blue Static
+|| # Copyright (c)2005-2009 Blue Static
|| #
|| # This program is free software; you can redistribute it and/or modify
|| # it under the terms of the GNU General Public License as published by
-|| # the Free Software Foundation; version [#]gpl[#] of the License.
+|| # the Free Software Foundation; version 2 of the License.
|| #
|| # This program is distributed in the hope that it will be useful, but
|| # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
\*=====================================================================*/
/**
-* Date formatting system (Date.php)
-*
-* @package ISSO
-*/
+ * Date formatting system (Date.php)
+ *
+ * @package ISSO
+ */
/**
-* Defined constant time
-*/
+ * Defined constant time
+ */
define('TIMENOW', time());
/**
-* Date Formatting System
-*
-* This framework wraps date and time functions into one neat little
-* package that takes care of modifying timestamps to meet the right
-* time zone
-*
-* @author Blue Static
-* @copyright Copyright ©2002 - [#]year[#], Blue Static
-* @version $Revision$
-* @package ISSO
-*
-*/
+ * Date Formatting System
+ *
+ * This framework wraps date and time functions into one neat little
+ * package that takes care of modifying timestamps to meet the right
+ * time zone
+ *
+ * @author Blue Static
+ * @copyright Copyright (c)2005 - 2009, Blue Static
+ * @package ISSO
+ *
+ */
class BSDate
{
/**
- * Offset in seconds; this is set using fetch_offset()
- * @var integer
- */
+ * Offset in seconds; this is set using fetch_offset()
+ * @var integer
+ */
private $offset = 0;
- // ###################################################################
/**
- * Sets the user time zone and then calculates the total offset
- *
- * @param float User time zone
- */
+ * Sets the user time zone and then calculates the total offset
+ *
+ * @param float User time zone
+ */
public function setUserTimeZone($usertz)
{
$this->offset = $usertz * 3600;
}
- // ###################################################################
/**
- * Formats a UNIX timestamp to a certain date format in the proper time
- * zone
- *
- * @param string Format of the date (same as PHP's date() function)
- * @param integer UNIX timestamp to format
- * @param bool Adjust the date to the user's language?
- *
- * @return string Formatted date
- */
+ * Formats a UNIX timestamp to a certain date format in the proper time
+ * zone
+ *
+ * @param string Format of the date (same as PHP's date() function)
+ * @param integer UNIX timestamp to format
+ * @param bool Adjust the date to the user's language?
+ *
+ * @return string Formatted date
+ */
public function format($format, $timestamp = TIMENOW, $adjust = true)
{
if ($adjust)
return gmdate($format, $timestamp);
}
- // ###################################################################
/**
- * Fetches an array of timezone names indexed by their offset
- *
- * @return array List of timezones
- */
- public static function FetchTimeZoneList()
+ * Fetches an array of timezone names indexed by their offset
+ *
+ * @return array List of timezones
+ */
+ public static function fetch_timezone_list()
{
$opt = array();
}
}
-/*=====================================================================*\
-|| ###################################################################
-|| # $HeadURL$
-|| # $Id$
-|| ###################################################################
-\*=====================================================================*/
?>
\ No newline at end of file