array(REQ_NO, null, false) ); // ################################################################### /** * Constructor: sets the server's timezone */ function __construct(&$registry) { $this->registry =& $registry; $this->servertz = date('Z', TIMENOW) / 3600; } // ################################################################### /** * (PHP 4) Constructor */ function Date(&$registry) { $this->__construct($registry); } // ################################################################### /** * Sets an ISSO field * * @access public * * @param string Field name * @param mixed Value of the field */ function set($name, $value) { $this->registry->do_set($name, $value, 'date'); } // ################################################################### /** * Gets an ISSO field * * @access public * * @param string Field name * * @return mixed Value of the field */ function get($fieldname) { return $this->registry->do_get($fieldname, 'date'); } // ################################################################### /** * Computes the total offset, taking into account all the various * options * * @access public */ function fetch_offset() { $this->offsettz = $this->servertz - $this->usertz; $this->offset = $this->offsettz * 3600; } // ################################################################### /** * Formats a UNIX timestamp to a certain date format in the proper time * zone * * @access public * * @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 */ function format($format, $timestamp = TIMENOW, $adjust = true) { if ($adjust) { $timestamp -= $this->offset; } return date($format, $timestamp); } // ################################################################### /** * Fetches an array of timezones for a