1<?php
2$timestamp=1333699439;
3echo gmdate("Y-m-d\TH:i:s\Z", $timestamp);
4?>
1
2<?php
3$date = new DateTime();
4echo $date->format('U = Y-m-d H:i:s') . "\n";
5
6$date->setTimestamp(1171502725);
7echo $date->format('U = Y-m-d H:i:s') . "\n";
8?>
9
10