I'm trying to create a Drupal View table of CiviCRM activities that calculates the end time of the activity based on start time and duration.
So far I've got the unix start time of the activity, a math expression that turns duration into unix minutes and a math expression that adds the unix start time and the unix duration minutes to get the unix end time of the activity.
The final step is to convert that unix end time of the activity to a human readable time like 7:32 AM. All math expressions work correctly, I've checked the computed end time (expression_1) field with unix converters.
I'm not certain where I'm hitting a wall but if I test the output with the Views PHP module (I'll code it into my template once I get it ironed out) using something like this:
<?php
print date('d-M-y g:i A', $row->expression_1);
?>
I get 31-Dec-69 7:00 PM as the output for every row. Which is the day prior to unix's base time of January 1, 1970.
I'd appreciate any guidance.