Digital humanities et recherche

Catégories

Tags

ajax archives bdd blog cn2sv digital humanities dublincore e-rudition encoded archival description film flux Google histoire ICEberg images informatisation interopérabilité iptc ist javascript kml mashup mathML mets mysql métadonnées OAI-PMH OAIS paris perl photos php pérennisation recherche ruby science simulation sources historiques standards super 8mm web 2.0 web of data xml xmp édition

Photos Flickr

holidays under hatclose"Aa"dsend of the daytizz tzz tizz tzz tizz... summer in the south

RSS MédiHAL

Trancodage de dates informatiques

Bonsoir,

Un petit script php très simple pour convertir une date du type AAAA-MM-JJ HH:MM:SS en date normée suivant RFC 822 utilisée dans les flux RSS ou dans le monde OAI-PMH :

$datedepart = '2007-09-10 00:00:00'; // on entre la date (qui peut venir d'un champ de type datetime de SGBDR : MySQL, PostgreSQL, etc.)
list($date, $hours) = split(' ', $datedepart);
list($year,$month,$day) = split('-',$date);
list($hour,$min,$sec) = split(':',$hours);

$date = date(r,mktime($hour, $min, $sec, $month, $day, $year));
print "$date";

Stéphane.

Source : http://www.phpfreaks.com/quickcode/from-MySQL-datetime-to-RFC-822-for-RSS/597.php
http://blog.stephanepouyllau.org/100