Closed (duplicate)
Project:
Date
Version:
6.x-2.x-dev
Component:
Date API
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Oct 2010 at 19:12 UTC
Updated:
27 Apr 2012 at 10:45 UTC
Jump to comment: Most recent file
Comments
Comment #1
vordude commentedHow to see this bug:
-Build a CCK node type with a Date field that only has Year, Month, Day granularity.
-Create a node of this type. (With Error Reporting turned on, as described here: http://randyfay.com/node/76)
-See the PHP Notices as listed above for Hours, Minutes, and Seconds that are not included in the date field.
Comment #2
vordude commented(and of course I mean *as an array)
Comment #3
manarth commentedNot sure about defaulting the day/month to 0 - day and month start from 1.
Comment #4
vordude commentedJust trying to reproduce the current functionality.
I wouldn't add data to non-existent data.
(Granted, a zero is more data than null...but I would say a zero is better than a 1 in this case.)
Attached image is a screenshot of how it's being stored in the database.
Edit: (I realized in the image, I flipped the name of the tables, and was trying to demonstrate the module is already storing a 0 for a portion of a date that's not in use.)
Comment #5
pdrake commentedThe attached patch resolves these PHP notices and sets the values to NULL so that the behavior of this functions is not altered.
Comment #6
karens commentedA fix for this got into the code sometime since this was reported. There must have been a duplicate issue with a patch that got committed. Anyway, it's no longer an issue.