Hi,
I'm using PathAuto to create automatic URL Aliases; however, whenever I create content (page, blog, etc.) the URL alias is incorrect and does not match the timestamp in the database.
I am using the following Path Pattern: [yyyy]/[mm]/[dd]/[title-raw].
Even when I change the timestamp through Drupal, the URL is still incorrect and is 1 day behind.
The strange thing I have noticed is that I have created a View to display a list of all entries and this lists the following:
- Story: Title
- Story: Post date
The Story Post date is actually showing the correct date???
Let me know if I need to provide more information as this is very, very frustrating.
Thanks,
Giarnz
Comments
Comment #1
gregglesThanks for reporting the bug. Unfortunately when I just tested it everything worked perfectly :/ So, I'm unable to repeat this bug.
What is your "Update action: " under the General settings?
Comment #2
giarnz commentedHi greggles,
Thanks for the quick reply.
The update action is:
"Create a new alias. Delete the old alias."
I just checked the node in the db, and the timestamp is 1222049238 which equates to Monday, September 22nd 2008, 2:07:18.
The pathauto URL is:
2008/09/21/post-title
Thanks greggles
Comment #3
gregglesIs it off by a consistent amount? Perhaps this is a timezone problem?
Comment #4
giarnz commentedHi greggles,
It's off by the day before it seems. What's strange is that the view I have configured from the "Views Module", displays the correct date; so it looks strange with the URL being 1 day behind the displayed view time.
Comment #5
Freso commentedSo it is 24 hours behind? Or is it 3 hours behind? What happens if you post at, say, 11:07:18 or 17:07:18?
And bonus questions:
What time zone is the site set to?
Are the users allowed to set their own time zone?
If so, what is your (editing) user's time zone?
Comment #6
giarnz commentedHi Freso,
1) The "Default time zone" is set to +0000.
2) I am the only user submitting content and "User-configurable time zones" are disabled.
3) The timestamps in the database are using PDT times (-0700)
4) The "Authored on:" timestamp is adjusted for the "Default time zone"
I'll create some more content in 2 hrs, which is when the PDT time will be September 23.
My possible guess is that the Views module is using the timestamp and then adjusting it against the "Default time zone"; whereas the pathauto module is using the timestamp and not adjusting it against the "Default time zone".
Thanks,
Giarnz
Comment #7
Freso commentedThat's precisely my guess as well. :) I must admit I don't know what to do about it from a Pathauto point of view though. Should the date be the system date (ie., GMT), or based on the user submitting the content's time zone, or on the site's time zone? I'm guessing it should be the latter, but, well. (In any case, this feels like a feature request, or at the very least a behavioural change... meaning 6.x-2.x.)
Comment #8
giarnz commentedFreso,
I can confirm that my original guess is in fact the issue; as I have matched the Drupal time with the server time and all is functioning correctly. :)
As per your post, this issue definitely needs to be addressed sooner rather than later, and the solution (based on install time or user time) is another issue altogether.
Thanks for your help with this (and Greggles),
Giarnz
Comment #9
talatnat commentedAny further news on this?
I am encountering the same issue: The webserver is located in Houston (-7 h), the website date is based in Berlin (0), and the user is in Bangkok (+5 h). Views displays the date correctly but the URL alias comes out -1 day. Is the current solution to change the website date to that of the webserver (I don't think the shared server allows me to change that date)?
Comment #10
talatnat commentedOn a suggestion, I added this to my .htaccess file:
SetEnv TZ Europe/London
to match the webserver's time with that of the website itself.
However, this command does not work, and I still have -1 day in the URL.
Any suggestions on a better way to set the webserver's time, or any other workaround will be a great help.
Comment #11
tedl commentedI to have the same problem and I'm quite sure it has something to do with timezones. I only have this problem using the time from the nodes post date if the node is posted after 22:00. I guess Central European Time is +2 hours ahead of UTC... Would of course appreciate any help.
Comment #12
dave reidThese tokens are provided by token.module, not pathauto.module.
Comment #13
dave reidSite timezone offset will be fixed by #307520: Date formatting function