Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Bug (?) when making permlink /year/month/day/title (time settings)
I have 4.2.0 release (full diag).
If my local time is 10:00 and today is (yyyy-dd-mm) 2009-12-09 (city Minsk GMT-2) and server offset time is set to -10, when i enter Write tab timestemp is set to 209-11-09 22:00 – it’s ok, like I expected. After I press publish button i get this permlink http://site.net/2009/09/12/title – is it normal?
And if to specify the bug in one sentence, than: Txp’s permlink generation logic doesn’t looks for time offset in ulrmode year\month\date\title
Last edited by the_ghost (2009-09-12 07:07:36)
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
Re: Bug (?) when making permlink /year/month/day/title (time settings)
If I get it right:
- Your time is: 2009-12-09 10:00 GMT-2?
- Function posted() returns: 2009-11-09 22:00?
- Permlink is: /2009/09/12/
- The permlink returns the article?
- The permlink isn’t effected by your TXP settings?
What is your server time? 2009-12-09? And it is stored inside the DB? If yes, then yep, I supose the permlink is correct, or it is always been like that. The permlink is the time without any TXP related settings: offset and DST, taken straight from DB. The settings you put into TXP prefs table, only affect the function calls after the date is taken out of the textpattern table.
Last edited by Gocom (2009-09-12 07:41:08)
Offline
Re: Bug (?) when making permlink /year/month/day/title (time settings)
Gocom wrote:
Your time is: 2009-12-09 10:00 GMT-2?
My server time is 2009-12-09 08:00 GMT+0. I Add offset GMT-10 for testing. My local time doesn’t matter. Imaging I’m in Hawaii now :)
Function posted() returns: 2009-11-09 22:00?
I placed <txp:posted /> in my article. It returns 11.09.2009 22:00
Permlink is: /2009/09/12/
Yes, article was found at url http://site.net/2009/09/12/title
The permlink returns the article?
Yes.
The permlink isn’t effected by your TXP settings?
Don’t understand…
What is your server time? 2009-12-09 08:00 UTC?
Server time is 2009-09-12 03:00:00 (i.e. GMT-5) (got it from diag). Maybe it’s “raw? time, after it gmt+5 is made so server time is set to gmt+0?
And it is stored inside the DB?
I don’t know, sorry :)
If yes, then yep, I supose the permlink is correct, or it is always been like that. The permlink is the time without any TXP related settings: offset and DST, taken straight from DB. The settings you put into TXP prefs table, only affect the function calls after the date is taken out of the textpattern table.After showing that <txp:posted /> and permlink show different time i think it’s a bug? Please, tell me what to do, to clearify this problem :)
Last edited by the_ghost (2009-09-12 07:45:08)
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
Re: Bug (?) when making permlink /year/month/day/title (time settings)
the_ghost wrote:
After showing that <txp:posted /> and permlink show different time i think it’s a bug?
Not entirely a bug, but just the way TXP handles permlinks, as it’s been always like that, I think and as I remember. Note that the way TXP handles permlinks is really old, written ages ago.
The <txp:posted />
is effected by the TXP timezone settings, wheres the permlink is the time server returns. Althought, that could be changed by next TXP releases (if the team wants to change it, ‘cause of some backwards comp issues). So, the permlink should be the time that is stored inside the textpattern table with the article. That time is the server time, or the time SQL’s now()
returns.
Offline