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
Comment #1
samccone commentedSo, 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
Comment #2
ayalsule commentedsame problem with
PHP 5.1.6
Drupal 6.20
you must enable php4 module
Comment #3
samccone commentedIt was enabled....
Comment #4
karens commentedThings that are fixed in dev are fixed. We have a number of other issues to get through before rolling a new release.
Comment #5
thelioness22 commentedI 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.
Comment #6
karens commentedThe '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.
Comment #7
arlinsandbulte commentedKaren,
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.
Comment #8
marek67 commentedHi 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!
Comment #9
rizzo commentedSimilar 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.
Comment #10
rizzo commentedConfirming that @marek67's fix does seem to work, I haven't had time to determine how or why.
Comment #11
gianfrasoft commentedHere, same problem.
Comment #12
gianfrasoft commentedDev version solved the problem to me.
Thanks!
Comment #14
k3n3dy commentedI'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.
Comment #15
arlinsandbulte commentedThis issue has been fixed & closed multiple times.
If you are still having a problem here, open a new issue.
thanks