Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Date Based URLvar problem with time offset
Owww, brain hurteeeee….
But your system is laid out with such conviction and depth, I vote for it. At the end of the day, publishing articles to appear or expire at certain times would be a helluva lot easier if I could specify an absolute time when that event occurs and leave the server admins/politicians to have a bun fight over when DST occurs. Or doesn’t.
saccade for Timelord :-)
Last edited by Bloke (2008-11-10 12:20:29)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#17 2008-11-10 12:29:37
- saccade
- Plugin Author

- From: Neubeuern, Germany
- Registered: 2004-11-05
- Posts: 521
Re: Date Based URLvar problem with time offset
Thanks :-)
(slowly remembering my name after fighting with those time description issues, fortunately it is written anywhere and won’t change by any setting) :)
Offline
Re: Date Based URLvar problem with time offset
This sounds quite rational…
I suggest we show the simple timestamp fields by default in the UI and move the rest of the confusingly named “more” items to a “time options” which is hidden.
On a side note… I’d like to know more about your mdp_calendar hacks. I routinely use a “hacked within an inch of it’s life” version of mdp_calendar myself.
Offline
#19 2008-11-10 21:03:17
- saccade
- Plugin Author

- From: Neubeuern, Germany
- Registered: 2004-11-05
- Posts: 521
Re: Date Based URLvar problem with time offset
@mrdale
I’m putting my documentation together (begun and stuck). You can see an example here . Basically I did some category tweak to specify and style different types of entry (in the example different communities which post their events, one in red, the other in blue, common events in green). Also some modifications to get finer styling (like coloring sundays of a week).
Last edited by saccade (2008-11-10 21:05:23)
Offline
Re: Date Based URLvar problem with time offset
tapping feet… whistling….
Offline
Re: Date Based URLvar problem with time offset
Personally, I set both server and TXP to use GMT/UTC without DST and let the user see the time in the timezone he/she has configured on his/her own system using Javascript.
To solve this in TXP, you have to ask yourself how far do you want to go… should TXP allow for the option of posting in different timezones (what happens if the site author moves to a different timezone?).
Offline
#22 2008-11-17 15:31:08
- saccade
- Plugin Author

- From: Neubeuern, Germany
- Registered: 2004-11-05
- Posts: 521
Re: Date Based URLvar problem with time offset
I had in mind a far scenario too.
But for now I’d like to have a solution which will be practically and which would solve the DST-shift-error for past/future times.
The GMT trick sounds good, but will it work with calendar plugins too?
And – most important – is it possible that an author who doesn’t want to bother about time calculations could enter his correct time (that means: will the time be calculated backwards to meet GMT/UTC correctly)?
Obviously this solution needs a timetable which will know the correct DST-state for any past and future time.
So as a first thought: A solution should be capable of cancelling out DST-state-management for any diachronic (past and future) time – and only need the correct DST-state for the synchronic time valid in this moment (that is a single and always distinct state).
A solution along my proposal means: No need for any DST-table! Never!
And regarding a far solution:
For those who will likely change their server time zone of course there must be a reference. timezone-chancging won’t happen very often. I could imagine something like this: There could be an additional tag in the database which will specify the timezone (not DST!) which has been active when creating/editing an article. This will be enough.
When someone changes his server timezone (or the timezone he/she wants to show all time indicators in) there could be a one time button with a routine “recalculate timestamps” based on the timezone-tag saved in the database and the currectly active timezone.
A more far solution could be to include a timezone tag for every timestamp AND let users/authors choose/change their timezone when editing by a simple list. This of course requires an additional output which will specify which timezone the author lived in when creating/editing an article.
In every case: Leave out DST from any calculations. It’s only real place is the current synchronic time.
(I hope I didn’t make any mistake now. Just a fast thought. Have to think about again.)
Last edited by saccade (2008-11-17 17:11:02)
Offline
Re: Date Based URLvar problem with time offset
ruud wrote:
Personally, I set both server and TXP to use GMT/UTC without DST
That’s not a bad solution for those of us who can actually set our server’s time prefs. When the hoster controls it, all bets are off!
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
Re: Date Based URLvar problem with time offset
ruud> BTW some feedback.. Mary’s hack works… and the variation you offered (thanks) did not.
Offline
Re: Date Based URLvar problem with time offset
Dale, how does it not work… does it generate an SQL error or does it not do the timezone correction?
Offline
Re: Date Based URLvar problem with time offset
ruud wrote:
Dale, how does it not work… does it generate an SQL error or does it not do the timezone correction?
would not do the timezone correction.
Offline
Re: Date Based URLvar problem with time offset
Google brought me here, investigating time issues after moving my sites from EST to PST.
As it stands now, any sites I’ve used date based urls on, are getting 404’s for certain articles.
Edit: more Google fun: http://forum.textpattern.com/viewtopic.php?pid=83879#p83879
Last edited by hcgtv (2008-12-10 21:01:21)
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline