[pmwiki-users] Conditional Directive based on time - standards
Patrick R. Michaud
pmichaud at pobox.com
Thu Oct 13 11:38:15 CDT 2005
On Thu, Oct 13, 2005 at 10:57:06AM -0500, Jonathan Scott Duff wrote:
> > (:if date_t 200510..2006:) # 2005-Oct-01 through 2006-Dec-31
> > (:if date_t ..2005-10-13T12:00 :) # until noon on 2005-Oct-13
> There's still the question of time zones. If I'm in California but my
> web hosting company is in New Jersey, my idea of when noon is will be
> quite different from when my webserver thinks noon is. So, the WikiAdmin
> (at least) needs to be able to specify the default timezone for the
> date/time based conditionals.
The WikiAdmin already specifies the default timezone for the wiki
(i.e., for all other displayed dates and times), and I don't think
anyone using the time markup would be terribly confused by the
fact that it's the server's view of time that governs things.
If I deal with an online news or financial services system, it's
pretty normal to find the times to given according to where the
remote service is located and not where I'm located.
> As a slight aside, it would be nice to have a time only conditional
> such that you could do things like this:
> (:if time 1200..1800 :)
> display every day but only between the hours of 12:00pm and 6:00pm
Yes, I thought of that also, although I'm wondering if something like
this ought to be somewhat cron-like so that we can also say things
like "1st of every month", "every monday", "every other hour", etc.
More information about the pmwiki-users