Project:Date
Version:6.x-2.x-dev
Component:Date CCK Field
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Hi,

Although the dev branch from 2009-Mar-09 fixes the 'now' problem ('now being fixed to 2009-01-01'), it still does not work correctly when one uses a date modifier like now+1 or now-5. Then it just returns the now value and totally ignores the modifier.

Comments

#1

Yeah.. I am having the same issue. When I use a modifier like "now +7 day" or something similar, query that is generated always uses date 2009-01-01.

WHERE ((node.status <> 0) AND (node.type in ('page')))
    AND (DATE_FORMAT(ADDTIME(STR_TO_DATE(node_data_field_date.field_date_value, '%Y-%m-%dT%T'), SEC_TO_TIME(-14400)), '%Y-%m-%d\T%H') < '2009-01-01T00')

#2

I'm also using using 2009-Mar-09 dev snapshot. I can't get modifiers to work for me either.

Since my date field doesn't have hour granularity, I can't use timezone handling. The site's timezone is far ahead of the servers and as a result when filtering these date fields, it isn't until well into the next day (4pm site time) that the filter is applied.

I've tried using 'now +1 day' and variations thereof to try and get this working but without success.

#3

I've figured out that the Absolute value kept showing up as a text date like 2009-03-18 (eg 1st jpg). Each time the filter was edited I needed to remove the text. Clearing the cache made no difference.

My solution was to create a new filter in order to stop this behaviour. This made the Absolute value show up with the -Year, -Month, -Day selection boxes (eg 2nd jpg).

I've discovered that the reason it kept showing up as a text date was that under the settings for the filter, Date form type was set to Text rather than Select.

AttachmentSizeStatusTest resultOperations
absolute_value-problem.jpg49.44 KBIgnored: Check issue status.NoneNone
absolute_value-solution.jpg47.24 KBIgnored: Check issue status.NoneNone

#4

Status:active» fixed

Using modifiers like 'now +1day' is working for me with Date 6.x-2.x-dev (2009-Mar-21).
Even with the Date form type for Absolute value set to text, this is working for me.

#5

Status:fixed» active

does not work as stated in the response above...

#6

Status:active» postponed (maintainer needs more info)

Don't reopen closed issues unless you have information to provide. Saying 'does not work' is a totally useless report that is impossible to address. What version of the code are you using? This is fixed in -dev, not in other versions. If you have a problem in the latest -dev code you need to provide specific details about what kind of date field your are using, how that field is set up, how your view is set, probably along with an export of the date field and the view. And I also need to know exactly what 'does not work' means, since that is totally meaningless by itself. What did you input? What did you see?

Since no one else is seeing your problem you either have the wrong version or something different in your setup so you have to provide details about exactly how to see whatever it is you're reporting.

#7

Well.. before criticizing me for not providing info, this thread is for 2.x-dev and CCK field, and if you look above, I have reported the query that gets generated in view, if I use the modifier value, such as "now +1 day".

Just because someone comes and marks the thread fixed, does that constitute as being fixed? The problem was not solved, so I reported again.

It a CCK field, used in view as a filter to restrict content that falls between certain period (i.e. start date and end date).

#8

Status:postponed (maintainer needs more info)» closed (fixed)
nobody click here