Fuixes in datefield
This commit is contained in:
parent
b5b4740b7c
commit
65dd012728
2 changed files with 10 additions and 2 deletions
|
|
@ -124,7 +124,7 @@ class ChoiceField extends PhangoField {
|
||||||
public function show_formatted($value)
|
public function show_formatted($value)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->restart_formatted();
|
//$this->restart_formatted();
|
||||||
|
|
||||||
return $this->arr_formatted[$value];
|
return $this->arr_formatted[$value];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ class DateField extends PhangoField {
|
||||||
public $quot_close='\'';
|
public $quot_close='\'';
|
||||||
public $set_default_time=0;
|
public $set_default_time=0;
|
||||||
public $std_error='';
|
public $std_error='';
|
||||||
|
public $to_utc=true;
|
||||||
|
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
|
@ -91,8 +92,15 @@ class DateField extends PhangoField {
|
||||||
|
|
||||||
if(PhaTime\DateTime::obtain_timestamp($value))
|
if(PhaTime\DateTime::obtain_timestamp($value))
|
||||||
{
|
{
|
||||||
|
|
||||||
|
$final_value=$value;
|
||||||
|
|
||||||
$final_value=PhaTime\DateTime::local_to_gmt($value);
|
if($this->to_utc)
|
||||||
|
{
|
||||||
|
|
||||||
|
$final_value=PhaTime\DateTime::local_to_gmt($value);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue