Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Utorok, 24. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  ['strftimemask'] mask

phpMyEdit Configuration     ['strftimemask'] mask
Odoslať novú tému   Odpovedať na tému    
 
hbernard     Založený: 23.03.2003   Príspevky: 159   Bydlisko: FRANCE
Príspevok Zaslal: 2003-11-15 19:49
Návrat hore  Odpovedať s citátom     

Reading your sample, didn't you mean _date_ mask ?

This is working for me :

'datemask' => 'y/m/d (H:i)',

Doug Hockinson Napísal:
Is ['strftimemask'] broken, or am I simply having difficulty using it? Is there a fix or workaround for ['strftimemask']?

Where 'col_name' is an integer value derived from a time() function, I'm trying to display a date in YYYYMMDD.

Kód:
$opts['fdd']['col_name']['strftimemask'] = '%Y%m%d';


 
hbernard     Založený: 23.03.2003   Príspevky: 159   Bydlisko: FRANCE
Príspevok Zaslal: 2003-11-16 07:47
Návrat hore  Odpovedať s citátom     

datemasked fields are aliased with "_timestamp" (around Ln 448)

I wonder if timemasked fields should be ?

then, bug fix is :
either the one you write
either (around Ln448)

Kód:
+if ($this->@$this->fdd[$k]['strftimemask']) {
+$fields[] = 'UNIX_TIMESTAMP('.$this->fqn($k).') AS qf'.$k.'_timestamp';
+}


We have to fill in a bug and reference this topic


Doug Hockinson Napísal:
Maybe I solved this by making a change in the class file around line 1193.

Kód:
} else if (@$this->fdd[$k]['strftimemask']) {
// original line
// $value = $row["qf$k".'_timestamp'];
// new line
$value = $row["qf$k"];


Is this a bug-fix? The following now works (integer input displayed as a date).

Kód:
$opts['fdd']['int_date'] = array(
  'name'       => 'Int Date',
  'default'    => time(),
  'maxlen'     => 11,
  'required'   => true,
  'options'    => 'ACPVDFL',
  'select'     => 'T',
  'help|ACP'   => 'Numeric.<br>Limit 11 chars.',
  'sort'       => true
);
// Column type: int(11) - int
$opts['fdd']['int_date']['strftimemask'] = "%c %Z";
Kód:


 
nepto     Založený: 06.01.2003   Príspevky: 320   Bydlisko: Phoenix, Arizona (USA)
Príspevok Zaslal: 2003-12-04 20:52
Návrat hore  Odpovedať s citátom     

But there is already written this (around line 448):

Kód:
if ($this->col_has_datemask($k)) {
  $fields[] = 'UNIX_TIMESTAMP('.$this->fqn($k).') AS qf'.$k.'_timestamp';
}


_________________
Ondrej Jombik (Nepto)
Visit my homepage , review my recent CV or projects and give me some feedback .
 
hbernard     Založený: 23.03.2003   Príspevky: 159   Bydlisko: FRANCE
Príspevok Zaslal: 2003-12-04 23:01
Návrat hore  Odpovedať s citátom     

Nepto and Doug, you're certainly both right ;-)

Ln 447
Kód:
if ($this->col_has_datemask($k)) {


make all date-and-time-masked field aliased with

Kód:
$fields[] = 'UNIX_TIMESTAMP('.$this->fqn($k).') AS qf'.$k.'_timestamp';


it seems there is some trouble with making use of UNIX_TIMESTAMP on integers ?

Doug Hockinson Napísal:
As I posted previously, I don't think the problem is with "function create_column_list()" but with "function cellDisplay($k, $row, $css)". But I am often wrong.


 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov