Dates and Times

Most database fields are unix time stamps, as returned by the php time() function and formatted by date(format,time). A few fields (User moddate) are MySQL timestamps, autogenerated anytime you update the record.


publishStart publishEnd
When the article (or whatever) should start being viewable and when it should stop. publishStart defaults to 0 (before you was born). publishEnd may be NULL meaning it should be published for ever.
view and all aggregate classes check to ensure the objekt is both online=1 and within date range. the wherePublished($qo) function in objektSearchFuncs.php will enforce that easily.

contentStartTime contentEndTime
These are times for the real world content, eg. an Event. When does the event start and/or stop ? Both or either may be NULL meaning "not applicable".

when first created

when last modified. note that objektLog keeps a full record, so this is of less use these days.


objekt_objekt moddate : replaced by lastModified
User lastVisit, time signup
Since we now track all log ins and outs, we have better info than this old style record.

convenient input for formatting the display of a time field with a format

input for setting dates

both a date and a time

allows setting a start date/time and a duration.
this is a good class to copy for further styles of event times.

All of these inputs should format correctly if the time is -1 or 0 (meaning 1970, the Unix epoch, meaning no valid date set) or for dates before that and after that.