[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 -- ============================================================================ 2 -- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be> 3 -- 4 -- This program is free software; you can redistribute it and/or modify 5 -- it under the terms of the GNU General Public License as published by 6 -- the Free Software Foundation; either version 2 of the License, or 7 -- (at your option) any later version. 8 -- 9 -- This program is distributed in the hope that it will be useful, 10 -- but WITHOUT ANY WARRANTY; without even the implied warranty of 11 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 -- GNU General Public License for more details. 13 -- 14 -- You should have received a copy of the GNU General Public License 15 -- along with this program; if not, write to the Free Software 16 -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 -- 18 -- $Id: functions.sql,v 1.2 2005/03/18 00:57:30 eldy Exp $ 19 -- $Source: /cvsroot/dolibarr/dolibarr/pgsql/functions/functions.sql,v $ 20 -- 21 -- ============================================================================ 22 23 CREATE OR REPLACE FUNCTION UNIX_TIMESTAMP(TIMESTAMP WITHOUT TIME ZONE) 24 RETURNS BIGINT 25 LANGUAGE SQL 26 IMMUTABLE STRICT 27 AS 'SELECT EXTRACT(EPOCH FROM $1)::bigint;'; 28 29 CREATE OR REPLACE FUNCTION UNIX_TIMESTAMP(TIMESTAMP WITH TIME ZONE) 30 RETURNS BIGINT 31 LANGUAGE SQL 32 IMMUTABLE STRICT 33 AS 'SELECT EXTRACT(EPOCH FROM $1)::bigint;'; 34 35 CREATE OR REPLACE FUNCTION FROM_UNIXTIME(BIGINT, VARCHAR) 36 RETURNS TIMESTAMP WITH TIME ZONE 37 LANGUAGE SQL 38 IMMUTABLE STRICT 39 AS 'SELECT TIMESTAMP WITH TIME ZONE \'epoch\' + $1 * interval \'1 second\' ;';
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 12:29:37 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |