When creating a new Date Field in CCK I am wondering what format to input.

I plan on using Arguments to show all posts on this date (Archives).

example.com/archive/2007-07-31 <---- Would give all nodes with CCK Date July 31, 2007

Question: Which granularity and input format to use? If I used the default "07-31-2007", would it affect my URL? ( Because the year is first in the URL, but last in the input format) . I have no need for hours,minutes or seconds. The only thing that matters is the day.

Comments

karens’s picture

Status: Active » Fixed

The format you use in your fields is independent of the Views arguments. Views arguments are the same for all kinds and formats of dates, otherwise the Views code would get too complex.

chadchandler’s picture

This is indeed a timezone issue, but what settings are best to use?

None for both the Date and the Sites time zone configured in admin?

The problem is my granularity is Year/Month/Day, and it fills hours/seconds with 0's by default, yes?

What is the ideal configuration to make the Argument Summary dates change on East coast time?

karens’s picture

If you have no need for hours and minutes, don't use them and don't use timezone handling. Leave them out of the granularity and leave them out of the display format. Never ask for timezone conversion if you're only tracking dates and not time. Timezone conversions introduce all kinds of places where there can be problems. I'm in the midst of a rewrite of the code to (hopefully) get rid of most or all of those problems by switching to the much better timezone handling used by PHP 5.2+ whereever it is available.

chadchandler’s picture

To clarify:
The correct dates are going to the correct view. The problem is when you try to use "Summary" view type with an argument to the CCK Date. Would you suggest even setting the admin>>site config>> site timezone?? Or leaving at 00 ? My server is in the central time zone though ( Dallas Texas)

chadchandler’s picture

Status: Fixed » Active

There has to be a problem with Views/Date Integration.

It's the "Summary" that is basically impossible to get correct without using hours/minutes.

To recreate:

Create a CCK Date Field (not timestamp)

Granularity: YY/MM/DD

Of course no timezones

Add content and add the date.

Create a View: For argument, use the date field you created, and select " Summary, sorted "however"
Option: Summarize by Day

Save this, and go to the view and notice the link is wrong.

chadchandler’s picture

Priority: Normal » Critical
mlncn’s picture

Status: Active » Closed (duplicate)

Summary View ( Using a Date as an argument)
http://drupal.org/node/165042

chadchandler’s picture

Status: Closed (duplicate) » Closed (fixed)