timesince() difficulties
timeSince() doesn't appear to be working for me. What should be something around 30 minutes comes back as 12/31/1969. Essentially,
[code]
$myDate = time(); //
The Date helper provides functions useful for working with dates and times. These are general functions that any application or website might find useful.)
$date = Loader::helper(‘date’);
Returns a date/time while checking a logged-in user’s timezone (if user timezones are enabled.)
print $date->getLocalDateTime(); print $date->getLocalDateTime(‘now’, ‘F d, Y’);
Converts a user entered datetime to the system datetime. Returns a date string.
Gets a list of all timezones available.
Returns a date string in a specific format, useful for a newsfeed, since a particular $postTime. If $precise == 1, the returns are more precise.
$r = $date->timeSince($dateOfMyPost, 1); print $r; // “2 days, 1 hour”