By miguev on
Hi
I read on documentation page of Date Module that It is possible use some differents formats to save date fields. Exactly Unix Timestamp, ISO Date, and Datetime, anybody knows if it's possible create a new custom format to save date fields?
I need save my date fields in UTC format in the database, but I not founded the best way to do in Drupal.
any ideas?
Thanks everybody.
Comments
Time Zone Handling
I think you should look at the time zone handling settings for the date field. You can use DateTime and set the time zone handling to UTC. See http://drupal.org/node/767182 for more details.
Yes, I had read that page and
Yes, I had read that page and I did that settings but Drupal not saved date field on UTC format. Anyway in this link "http://drupal.org/node/262066" explain how to work date module and I debug Drupal and I can see that It is so.
I am working with date module version 6.x-2.4, and although zone handling settings is in UTC, date fields only are saved with three possible formats: Unix Timestamp, ISO Date and Datetime.
When I debug Drupal, I see that date field always use ISO Date to save in DataBase.
I don`t know where I configure formats that it's show the documentation: http://drupal.org/node/262066 (Date 2.0 for Drupal 6)
Date Formats
You can setup Date Formats at admin/settings/date-time/formats . You can use the "Add formats" tab to add new formats based on PHP date formats from http://us.php.net/manual/en/function.date.php .
Also see http://drupal.org/node/1347404
Yes, I checked this case, but
Yes, I checked this case, but only work to show the date field and I want change the format that Drupal use to save date field in database.
Date issue
You may want to open an issue in the Date project issue queue at http://drupal.org/project/issues/date . The Date module is supposed to store values in the database according to UTC.