date in ISO standard

git-svn-id: http://piwigo.org/svn/trunk@488 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
z0rglub
2004-08-21 13:03:49 +00:00
parent 52a8435493
commit a5b9e275a1
+3 -5
View File
@@ -168,11 +168,9 @@ if ( isset( $_POST['submit'] ) and !isset( $_GET['waiting_id'] ) )
{
list( $day,$month,$year ) = explode( '/', $_POST['date_creation'] );
// int checkdate ( int month, int day, int year)
if ( checkdate( $month, $day, $year ) )
if (checkdate($month, $day, $year))
{
// int mktime ( int hour, int minute, int second,
// int month, int day, int year [, int is_dst])
$date_creation = mktime( 0, 0, 0, $month, $day, $year );
$date_creation = $year.'-'.$month.'-'.$day;
}
else
{
@@ -181,7 +179,7 @@ if ( isset( $_POST['submit'] ) and !isset( $_GET['waiting_id'] ) )
}
// creation of the "infos" field :
// <infos author="Pierrick LE GALL" comment="my comment"
// date_creation="1056891767" name="" />
// date_creation="2004-08-14" name="" />
$xml_infos = '<infos';
$xml_infos.= ' author="'.htmlspecialchars($_POST['author'],ENT_QUOTES).'"';
$xml_infos.= ' comment="'.htmlspecialchars($_POST['comment'],ENT_QUOTES).'"';