Changeset 515
- Timestamp:
- 08/01/07 17:11:25 (1 year ago)
- Files:
-
- trunk/lib/jelix-scripts/templates/var/config/dbprofils.ini.php.tpl (modified) (1 diff)
- trunk/lib/jelix-scripts/templates/var/config/dbprofils.ini.php.tpl (modified) (1 diff)
- trunk/lib/jelix/plugins/tpl/common/modifier.jdatetime.php (modified) (2 diffs)
- trunk/lib/jelix/plugins/tpl/common/modifier.jdatetime.php (modified) (2 diffs)
- trunk/lib/jelix/utils/jDateTime.class.php (modified) (5 diffs)
- trunk/lib/jelix/utils/jDateTime.class.php (modified) (5 diffs)
- trunk/myapp/var/config/dbprofils.ini.php.dist (modified) (1 diff)
- trunk/myapp/var/config/dbprofils.ini.php.dist (modified) (1 diff)
- trunk/testapp/var/config/dbprofils.ini.php.dist (modified) (1 diff)
- trunk/testapp/var/config/dbprofils.ini.php.dist (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/jelix-scripts/templates/var/config/dbprofils.ini.php.tpl
r496 r515 19 19 ;password= 20 20 ;persistent= on 21 ; when you have charset issues, enable force_encoding so the connection will be 22 ; made with the charset indicated in jelix config 23 ;force_encoding = on 21 24 22 25 ; pour pdo : trunk/lib/jelix-scripts/templates/var/config/dbprofils.ini.php.tpl
r496 r515 19 19 ;password= 20 20 ;persistent= on 21 ; when you have charset issues, enable force_encoding so the connection will be 22 ; made with the charset indicated in jelix config 23 ;force_encoding = on 21 24 22 25 ; pour pdo : trunk/lib/jelix/plugins/tpl/common/modifier.jdatetime.php
r506 r515 21 21 * <li>'lang_datetime' => jDateTime::LANG_DTFORMAT)</li> 22 22 * <li>'lang_time' => jDateTime::LANG_TFORMAT)</li> 23 * <li>'db_date' => jDateTime:: BD_DFORMAT)</li>24 * <li>'db_datetime' => jDateTime:: BD_DTFORMAT)</li>25 * <li>'db_time' => jDateTime:: BD_TFORMAT)</li>23 * <li>'db_date' => jDateTime::DB_DFORMAT)</li> 24 * <li>'db_datetime' => jDateTime::DB_DTFORMAT)</li> 25 * <li>'db_time' => jDateTime::DB_TFORMAT)</li> 26 26 * <li>'iso8601' => jDateTime::ISO8601_FORMAT)</li> 27 27 * <li>'timestamp' => jDateTime::TIMESTAMP_FORMAT)</li> … … 44 44 'lang_datetime' => jDateTime::LANG_DTFORMAT, 45 45 'lang_time' => jDateTime::LANG_TFORMAT, 46 'db_date' => jDateTime:: BD_DFORMAT,47 'db_datetime' => jDateTime:: BD_DTFORMAT,48 'db_time' => jDateTime:: BD_TFORMAT,46 'db_date' => jDateTime::DB_DFORMAT, 47 'db_datetime' => jDateTime::DB_DTFORMAT, 48 'db_time' => jDateTime::DB_TFORMAT, 49 49 'iso8601' => jDateTime::ISO8601_FORMAT, 50 50 'timestamp' => jDateTime::TIMESTAMP_FORMAT, trunk/lib/jelix/plugins/tpl/common/modifier.jdatetime.php
r506 r515 21 21 * <li>'lang_datetime' => jDateTime::LANG_DTFORMAT)</li> 22 22 * <li>'lang_time' => jDateTime::LANG_TFORMAT)</li> 23 * <li>'db_date' => jDateTime:: BD_DFORMAT)</li>24 * <li>'db_datetime' => jDateTime:: BD_DTFORMAT)</li>25 * <li>'db_time' => jDateTime:: BD_TFORMAT)</li>23 * <li>'db_date' => jDateTime::DB_DFORMAT)</li> 24 * <li>'db_datetime' => jDateTime::DB_DTFORMAT)</li> 25 * <li>'db_time' => jDateTime::DB_TFORMAT)</li> 26 26 * <li>'iso8601' => jDateTime::ISO8601_FORMAT)</li> 27 27 * <li>'timestamp' => jDateTime::TIMESTAMP_FORMAT)</li> … … 44 44 'lang_datetime' => jDateTime::LANG_DTFORMAT, 45 45 'lang_time' => jDateTime::LANG_TFORMAT, 46 'db_date' => jDateTime:: BD_DFORMAT,47 'db_datetime' => jDateTime:: BD_DTFORMAT,48 'db_time' => jDateTime:: BD_TFORMAT,46 'db_date' => jDateTime::DB_DFORMAT, 47 'db_datetime' => jDateTime::DB_DTFORMAT, 48 'db_time' => jDateTime::DB_TFORMAT, 49 49 'iso8601' => jDateTime::ISO8601_FORMAT, 50 50 'timestamp' => jDateTime::TIMESTAMP_FORMAT, trunk/lib/jelix/utils/jDateTime.class.php
r440 r515 73 73 const LANG_DTFORMAT=11; 74 74 const LANG_TFORMAT=12; 75 const DB_DFORMAT=20; 76 const DB_DTFORMAT=21; 77 const DB_TFORMAT=22; 78 const ISO8601_FORMAT=40; 79 const TIMESTAMP_FORMAT=50; 80 const RFC822_FORMAT=60; 81 82 /**#@+ 83 * use DB_* consts instead 84 * @deprecated 85 */ 75 86 const BD_DFORMAT=20; 76 87 const BD_DTFORMAT=21; 77 88 const BD_TFORMAT=22; 78 const ISO8601_FORMAT=40; 79 const TIMESTAMP_FORMAT=50; 80 const RFC822_FORMAT=60; 81 89 /**#@-*/ 82 90 83 91 function __construct($year=0, $month=0, $day=0, $hour=0, $minute=0, $second=0){ … … 117 125 $str = date($lf, $t); 118 126 break; 127 case self::DB_DFORMAT: 119 128 case self::BD_DFORMAT: 120 129 $str = sprintf('%04d-%02d-%02d', $this->year, $this->month, $this->day); 121 130 break; 131 case self::DB_DTFORMAT: 122 132 case self::BD_DTFORMAT: 123 133 $str = sprintf('%04d-%02d-%02d %02d:%02d:%02d', $this->year, $this->month, $this->day, $this->hour, $this->minute, $this->second); 124 134 break; 135 case self::DB_TFORMAT: 125 136 case self::BD_TFORMAT: 126 137 $str = sprintf('%02d:%02d:%02d', $this->hour, $this->minute, $this->second); … … 185 196 } 186 197 break; 198 case self::DB_DFORMAT: 187 199 case self::BD_DFORMAT: 188 200 if($ok=preg_match('/^(\d{4})\-(\d{2})\-(\d{2})$/', $str, $match)){ … … 192 204 } 193 205 break; 206 case self::DB_DTFORMAT: 194 207 case self::BD_DTFORMAT: 195 208 if($ok=preg_match('/^(\d{4})\-(\d{2})\-(\d{2}) (\d{2}):(\d{2}):(\d{2})$/', $str, $match)){ … … 202 215 } 203 216 break; 217 case self::DB_TFORMAT: 204 218 case self::BD_TFORMAT: 205 219 if($ok=preg_match('/^(\d{2}):(\d{2}):(\d{2})$/', $str, $match)){ trunk/lib/jelix/utils/jDateTime.class.php
r440 r515 73 73 const LANG_DTFORMAT=11; 74 74 const LANG_TFORMAT=12; 75 const DB_DFORMAT=20; 76 const DB_DTFORMAT=21; 77 const DB_TFORMAT=22; 78 const ISO8601_FORMAT=40; 79 const TIMESTAMP_FORMAT=50; 80 const RFC822_FORMAT=60; 81 82 /**#@+ 83 * use DB_* consts instead 84 * @deprecated 85 */ 75 86 const BD_DFORMAT=20; 76 87 const BD_DTFORMAT=21; 77 88 const BD_TFORMAT=22; 78 const ISO8601_FORMAT=40; 79 const TIMESTAMP_FORMAT=50; 80 const RFC822_FORMAT=60; 81 89 /**#@-*/ 82 90 83 91 function __construct($year=0, $month=0, $day=0, $hour=0, $minute=0, $second=0){ … … 117 125 $str = date($lf, $t); 118 126 break; 127 case self::DB_DFORMAT: 119 128 case self::BD_DFORMAT: 120 129 $str = sprintf('%04d-%02d-%02d', $this->year, $this->month, $this->day); 121 130 break; 131 case self::DB_DTFORMAT: 122 132 case self::BD_DTFORMAT: 123 133 $str = sprintf('%04d-%02d-%02d %02d:%02d:%02d', $this->year, $this->month, $this->day, $this->hour, $this->minute, $this->second); 124 134 break; 135 case self::DB_TFORMAT: 125 136 case self::BD_TFORMAT: 126 137 $str = sprintf('%02d:%02d:%02d', $this->hour, $this->minute, $this->second); … … 185 196 } 186 197 break; 198 case self::DB_DFORMAT: 187 199 case self::BD_DFORMAT: 188 200 if($ok=preg_match('/^(\d{4})\-(\d{2})\-(\d{2})$/', $str, $match)){ … … 192 204 } 193 205 break; 206 case self::DB_DTFORMAT: 194 207 case self::BD_DTFORMAT: 195 208 if($ok=preg_match('/^(\d{4})\-(\d{2})\-(\d{2}) (\d{2}):(\d{2}):(\d{2})$/', $str, $match)){ … … 202 215 } 203 216 break; 217 case self::DB_TFORMAT: 204 218 case self::BD_TFORMAT: 205 219 if($ok=preg_match('/^(\d{2}):(\d{2}):(\d{2})$/', $str, $match)){ trunk/myapp/var/config/dbprofils.ini.php.dist
r386 r515 15 15 password= 16 16 persistent= on 17 ; when you have charset issues, enable force_encoding so the connection will be 18 ; made with the charset indicated in jelix config 19 ;force_encoding = on 17 20 18 21 ; pour pdo : trunk/myapp/var/config/dbprofils.ini.php.dist
r386 r515 15 15 password= 16 16 persistent= on 17 ; when you have charset issues, enable force_encoding so the connection will be 18 ; made with the charset indicated in jelix config 19 ;force_encoding = on 17 20 18 21 ; pour pdo : trunk/testapp/var/config/dbprofils.ini.php.dist
r477 r515 22 22 password= 23 23 persistent= on 24 ; when you have charset issues, enable force_encoding so the connection will be 25 ; made with the charset indicated in jelix config 26 ;force_encoding = on 24 27 25 28 ; to run all test, you should install pdo on your server trunk/testapp/var/config/dbprofils.ini.php.dist
r477 r515 22 22 password= 23 23 persistent= on 24 ; when you have charset issues, enable force_encoding so the connection will be 25 ; made with the charset indicated in jelix config 26 ;force_encoding = on 24 27 25 28 ; to run all test, you should install pdo on your server
