[TYPO3] Just looking to verify the time part of start and stop times.
Curt Grimley
curt at cgss.net
Wed Apr 19 07:27:54 CEST 2006
Patrick O'Hara wrote:
> Each page or piece of content may have a start and stop time. This is
> actually a date. I believe that the element appears at 12:01 am on the
> start date and continues to appear until 12:00 pm on the stop date.
>
> Can someone verify this for me. I did check the documentation, but it does
> not mention the time unfortunately.
Hi Patrick,
For pages anyway, the logic is as shown here:
(from class.t3lib_tstemplate.php:)
$this->whereClause.=
'AND (starttime<='.$GLOBALS['SIM_EXEC_TIME'].')
AND (endtime=0 OR endtime>'.$GLOBALS['SIM_EXEC_TIME'].')';
The SIM_EXEC_TIME is the result of the php time() function when the
request was made. It is a unix timestamp - integer no. of seconds.
The starttime and endtime fields in the pages table are unix timestamps
also, but because of the CMS interface, they are always midnight; i.e.,
a multiple of 86400 seconds.
The 'start date' is the date it starts showing, and the 'stop date' is
the day it will stop showing. To be precise, the page starts showing at
12:00:00 AM on the start date, and stops showing at 12:00:00 AM on the
end date.
This means if you make starttime = endtime, the page will never show. To
show a page for just one date (d), you would set them to d and d+1.
And I rather assume this is all based on server time, meaning the time
at the user's position doesn't matter. Hope that helps! ~cg
More information about the TYPO3-english
mailing list