I was wondering if anyone else can reproduce this error:
When I enter in a form the datetime 2004-04-04 2:00, sfValidatorDate
cleans it into 2004-04-04 3:00 so that the datetime saved is
incorrect.

I traced it back to sfValidatorDate using mktime or strtotime to
change the date to timestamp and date to change the timestamp back to
datetime.

If I run the PHP this code on the CLI:

<?php
$ts = mktime(2, 0, 0, 4, 4, 2004);
echo "timestamp for '2004-04-04 2:00:00' is $ts\n";


$dt = date('Y-m-d h:i:s', $ts);
echo "Date for timestamp $ts is $dt";

I get the output:

timestamp for '2004-04-04 2:00:00' is 1081076400
Date for timestamp 1081076400 is 2004-04-04 03:00:00

I use PHP 5.2.5 on Windows XP or server 2003

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to