Index: branches/RC/core/kernel/utility/formatters/date_formatter.php =================================================================== diff -u -N -r10107 -r10530 --- branches/RC/core/kernel/utility/formatters/date_formatter.php (.../date_formatter.php) (revision 10107) +++ branches/RC/core/kernel/utility/formatters/date_formatter.php (.../date_formatter.php) (revision 10530) @@ -176,13 +176,24 @@ function Format($value, $field_name, &$object, $format=null) { if ( is_null($value) ) return ''; - if ( !is_numeric($value) ) return $value; // for leaving badly formatted date on the form + if ( !is_numeric($value) ) { + return $value; // for leaving badly formatted date on the form + } settype($value, 'int'); - if ( !is_int($value) ) return $value; + if ( !is_int($value) ) { + return $value; + } $options = $object->GetFieldOptions($field_name); - if ( isset($format) ) $options['format'] = $format; + if ( isset($format) ) { + $options['format'] = $format; + } + if (preg_match('/_regional_(.*)/', $options['format'], $regs)) { + // when such type of format is given directly to kDBBase::GetField + $options['format'] = $this->language->GetDBField($regs[1]); + } + if (!$options['use_timezone']) { return adodb_gmdate($options['format'], $value); } Index: branches/RC/core/kernel/db/db_tag_processor.php =================================================================== diff -u -N -r10494 -r10530 --- branches/RC/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 10494) +++ branches/RC/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 10530) @@ -729,13 +729,7 @@ if (!$format || $format == '$format') { $format = null; } - else { - // maybe duplicate code, test if code in kDateFormatter::SetMixedFormat works like code below (note by Alex) - if (preg_match("/_regional_(.*)/", $format, $regs)) { - $lang =& $this->Application->recallObject('lang.current'); - $format = $lang->GetDBField($regs[1]); - } - } + $value = $object->GetField($field, $format); if( $this->SelectParam($params, 'negative') )