Hello the issue I am having is with my custom Date field.

regardless of what date I choose the saved value is only the current date (of the server)....

I am running drupal 6.2 PHP Version 5.1.6 cck 6.x-3.x-dev

i have tried it with custom time formats, standard formats, blank default value and current default value,

it does the same with to and from dates and it does not matter upon the granularity or time zone conversion

any ideas?

Comments

samccone’s picture

So, the 6.x-dev branch appears to fix the issue,

I think you guys should roll the up the dev branch into the primary

this is a game killer for this module

ayalsule’s picture

Status: Active » Fixed
Issue tags: +PHP 5.1 (duplicate), +Date PHP4

same problem with
PHP 5.1.6
Drupal 6.20
you must enable php4 module

samccone’s picture

Status: Fixed » Active

It was enabled....

karens’s picture

Status: Active » Fixed

Things that are fixed in dev are fixed. We have a number of other issues to get through before rolling a new release.

thelioness22’s picture

I just ran into this problem, myself. Yes, this is a "game killer" for this module. It's imperative to roll this fix into a release, even if there are no other changes in the release. The module is pretty much useless if it can only save the current date.

karens’s picture

The 'fix' is to use a version of PHP that handles dates correctly. Things work fine for those that do. It is 'pretty much useless' only if you are using a version older than PHP 5.2.

There are only 24 hours in a day, I get to things as best I can, and I clearly state on the project page that fixing bugs related to old versions of PHP is a very very low priority.

arlinsandbulte’s picture

Karen,
Here is a thought: How about we roll an new point release of Date (6.x-3.x) that officially ENDS PHP4 support.
Those that need to or wish to keep using PHP4 (or 5.0 & 5.1) need to use the 6.x-2.x version.
The 6.x-2.x gets minimal maintenance.

marek67’s picture

Hi Karen,
I'm not exactly sure why it was not working, but after digging in to push my drupal to live due to some requirements (also pointed to juggle of date information), I've put a small hack in my code to make saving of dates possible.

my enviroment data: Drupal 6.2, php 5.1.4, CCK 6.x-2.9, Date 6.x-2.7

changes I've made local inside file located in /sites/all/modules/date/date_api.module


function date_format_date($date, $type = 'medium', $format = '', $langcode = NULL) {
//--- unwrapping from stdClass
if (get_class($date) == 'stdClass') {
$date = $date->value;
}
//---

have fun :] with Drupal!

rizzo’s picture

Similar here, I have Date PHP4 enabled.

Looking at the database (in content_type_), I can see that that the to/from dates were saved properly (looks like GMT timezone), but the node display displays the current time. It would change every minute with no actual modification to the node.

I'm asking the sys admin about upgrading from 5.1.6 to >= 5.2, but obviously such things are not done lightly when there are a number of other sites hosted on the server.

rizzo’s picture

Confirming that @marek67's fix does seem to work, I haven't had time to determine how or why.

gianfrasoft’s picture

Here, same problem.

gianfrasoft’s picture

Dev version solved the problem to me.

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

k3n3dy’s picture

Status: Closed (fixed) » Active

I'm experiencing the same issue here.

Drupal 6.22
Date 6.x-2.x-dev
PHP 5.2.17

I've setup two fields, being the first Date and the second a Date Time field, both with default value set to Empty. Using node_import 6.x-1.x-dev, when I send empty values in the .csv file, Date field assumes 01/01/2011 00:00 at node creation, while Date Time field assumes current date/time at node creation. It should be empty...

It happens with field set to select or text widget.

arlinsandbulte’s picture

Status: Active » Closed (fixed)

This issue has been fixed & closed multiple times.
If you are still having a problem here, open a new issue.
thanks