Convertig EXIF timestamp

Hey all,

I’m trying to convert the EXIF timestamps of some photos (they look like this in raw format: 1417180451) to something human readable. I tried to utilize the strtotime php funktion

<?php $s = $pic->exif()->timestamp(); ?>
<?php $date = strtotime($s); ?>
<p><?php echo date('H:i:s M d. Y', $date); ?></p>

But that does’nt work as expected. How can I get to work?

The strtotime() function takes a string as input, $s is probably an object that you need to convert to string first, try toString() or the php string() method.

solved it this way:

 <?php $time=$pic->exif()->timestamp(); ?>
 <?php echo gmdate("m.d.y", $time); ?>