the best thing, I use
is to store each time as a timestamp, in the database
Because it is easy to use PHP function date() to format any timestamp
it is much more difficult to take a formated date string and try to reformat it
It can be done, but I would avoid it.
If you have a timestamp, which is created using [man]time/man
you can display this is practical any way you want.
A timestamp is in GMT time. The unit is in seconds.
You can easily convert to any user's time to local timezone by adding substracting 3600 seconds ( 1 hour ).
Then you can format this timestamp anyway you want using [man]date/man and display it.
About all formats, click the date link.
[man]gmdate/man is probably a better choice for international websites.
Because date() automatically add your timezone, when formating
My bottomline:
There isnt often much to gain, by storing a formated date string in database.
Most of the time it is more handy, more flexible, to store TIMESTAMP from time() function.
<?php
// make a number representing current time, = timestamp
$now = time();
// insert this time, a unique number of seconds, into some field in database
$dbfield = $now;
// =======================================
// get a timestamp number from database
$then = $dbfield;
// Make a formatted string, using local timezone, corresponding to that GMT time
// Note: Even if you do not display hours/seconds,
// the tzone offset can/will effect the date! ... sometimes
// Format in this case: 21/06/2007 14:21
$tformat = "d/m/Y H:i";
$tzone = -6; // timezone GMT-6
// I use gmdate() to display timezone in relation to GMT
$datestring = gmdate( $tformat, $then+( $tzone * 3600 ) );
echo $datestring;
?>