Closed (fixed)
Project:
Date
Version:
5.x-1.6
Component:
Code
Priority:
Critical
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
2 Aug 2007 at 11:19 UTC
Updated:
16 Oct 2007 at 14:58 UTC
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
Comment #1
karens commentedThe 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.
Comment #2
chadchandler commentedThis 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?
Comment #3
karens commentedIf 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.
Comment #4
chadchandler commentedTo 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)
Comment #5
chadchandler commentedThere 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.
Comment #6
chadchandler commentedComment #7
mlncn commentedSummary View ( Using a Date as an argument)
http://drupal.org/node/165042
Comment #8
chadchandler commented