[support] Trouble with Relative Times and Filtering a View

Shai Gluskin shai at content2zero.com
Tue Apr 10 01:41:43 UTC 2012


@Linda wrote:

If you set the post time when you create the content (I assume that's what
> you mean), you don't need the filter do you? The content will post when it
> hits the time you set.
>

No, that isn't how it works. The "post date" has NO control over content
access; it is the "published" toggle in "publishing options" that controls
whether something is "published."

In my example, all of the content is being added to the site *in advance*.
All of the nodes are "published" when they are added, even though they'll
have "post date" dates way into the future. The site owners know that
content, being published, will be accessible via Google, etc. even before
the show up in the RSS. They don't care. They have a MailChimp RSS to Email
feed and it is important that a new article goes out every day. That's all.

So I *must* do some kind of filter based on "now." As an experiment, I
tried something which may be simpler, select content with "Post Date less
than now" and sort Desc. This also did not switch to the new article at
6PM. But rather at 9 PM.  For this to work I need to filter on Select
content with Post date less than now + 3 hours.

I think what is going on is that "Now" is the server time (my server is in
LA) and the Post date is in Eastern time.

Shai

On Mon, Apr 9, 2012 at 4:30 PM, Linda Romey <lromey at gmail.com> wrote:

> Why do you have it filtered? Whatever now is, it will be 24 hours
> difference. If you set the post time when you create the content (I assume
> that's what you mean), you don't need the filter do you? The content will
> post when it hits the time you set.
>
> On Mon, Apr 9, 2012 at 7:13 PM, Shai Gluskin <shai at content2zero.com>wrote:
>
>> Client needs content published to a feed automatically, once every 24
>> hours at a particular time. The content has already been created for all
>> future posts.
>>
>> I set it up as follows:
>>
>> Content:
>>
>> Item A: Post date set to 4/9 6 PM
>> Item B: Post date set to 4/10 6 PM
>> Item C: Post date set to 4/11 6 PM
>> Item D: Post date set to 4/12 6 PM
>>
>> I've created the feed in a View.
>>
>> Number of items to display is: 1
>> Sort is ascending on Post date.
>> Filter is set to: Post date is greater than now - 24 hours.
>>
>> This does not work. With this configuration Item A only gets onto the
>> feed at 10:01 PM on 4/9.
>>
>> It seems to work right if I set the filter to: Post date is greater than
>> "now - 20 hours."
>>
>> Clearly this must have something to do with the fact that the site is in
>> "EDT" which is UTC - 400. The site uses Drupal 6.25 with Date 2.8. The site
>> time zone is set to "America/New York" and "user configurable times zones"
>> are "disabled."
>>
>> Though I seem to have it working, I'm still confused. Can  anyone explain?
>>
>> Thanks,
>>
>> Shai
>>
>> --
>> [ Drupal support list | http://lists.drupal.org/ ]
>>
>
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20120409/ee84b547/attachment.html 


More information about the support mailing list