[development] problem with custom date and timezones

Lluís enboig at gmail.com
Thu Jul 16 15:40:29 UTC 2009

I have created a custom node type. I have a date field which I created
as int in order to use it in views, being able to sort it, format,

My problem right now is that when inserting a node with one date, it
appears as "day before" when viewing the node. How should I save it to
avoid this problem?

My form looks like
  $arrayF=getdate(($node->data_paper>0 ? $node->data_paper : time()));
  $form['data_paper_array'] = array(
    '#type' => 'date',
    '#title' => 'Data Factura',
    '#default_value' => $arrayF,
    '#required' => TRUE,
    '#weight' => -9,

My insert query looks like
  db_query("INSERT ......);

And my theme function:
  $output.="<li><b>Data Factura:</b>

Any hint/advice? Thanks

*La vida és com una taronja, què esperes a exprimir-la?
*Si creus que l'educació és cara, prova la ignorància.
*La vida és com una moneda, la pots gastar en el que vulguis però
només una vegada.
*Abans d'imprimir aquest missatge, pensa en el medi ambient.

More information about the development mailing list