mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Formatting fixed
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77099 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
b0a56e7d37
commit
a4cf64f105
@ -13,9 +13,9 @@
|
||||
*/
|
||||
class SSDatetime extends Date {
|
||||
function setValue($value) {
|
||||
// Default to NZ date format - strtotime expects a US date
|
||||
if(ereg('^([0-9]+)/([0-9]+)/([0-9]+)$', $value, $parts))
|
||||
$value = "$parts[2]/$parts[1]/$parts[3]";
|
||||
// Default to NZ date format - strtotime expects a US date
|
||||
if(ereg('^([0-9]+)/([0-9]+)/([0-9]+)$', $value, $parts))
|
||||
$value = "$parts[2]/$parts[1]/$parts[3]";
|
||||
|
||||
if($value) $this->value = date('Y-m-d H:i:s', strtotime($value));
|
||||
else $value = null;
|
||||
|
Loading…
Reference in New Issue
Block a user