diff options
author | RedMatrix <info@friendica.com> | 2014-11-18 08:33:04 +1100 |
---|---|---|
committer | RedMatrix <info@friendica.com> | 2014-11-18 08:33:04 +1100 |
commit | 5aba2e82dff5a550aef33f054d27b10602b7dafa (patch) | |
tree | cb400e785b59d25f0881491d50d6aa3ca653165b /mod/events.php | |
parent | b11ed7f88e4683315a4f5aa02692cb61facf32a7 (diff) | |
parent | e190adc58980c12c6dffb21dae57194aad354e3c (diff) | |
download | volse-hubzilla-5aba2e82dff5a550aef33f054d27b10602b7dafa.tar.gz volse-hubzilla-5aba2e82dff5a550aef33f054d27b10602b7dafa.tar.bz2 volse-hubzilla-5aba2e82dff5a550aef33f054d27b10602b7dafa.zip |
Merge pull request #695 from pafcu/master
Switch to a better datetime picker widget
Diffstat (limited to 'mod/events.php')
-rwxr-xr-x | mod/events.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/mod/events.php b/mod/events.php index 009afbcb8..5af7d381e 100755 --- a/mod/events.php +++ b/mod/events.php @@ -268,8 +268,8 @@ function events_content(&$a) { if($mode == 'view') { - $thisyear = datetime_convert('UTC',date_default_timezone_get(),'now','Y'); - $thismonth = datetime_convert('UTC',date_default_timezone_get(),'now','m'); + $thisyear = datetime_convert('UTC',date_default_timezone_get(),'now','Y'); + $thismonth = datetime_convert('UTC',date_default_timezone_get(),'now','m'); if(! $y) $y = intval($thisyear); if(! $m) @@ -549,7 +549,6 @@ function events_content(&$a) { $tpl = get_markup_template('event_form.tpl'); - $o .= replace_macros($tpl,array( '$post' => $a->get_baseurl() . '/events', '$eid' => $eid, @@ -567,11 +566,11 @@ function events_content(&$a) { '$ftext' => $ftext, '$ModalCANCEL' => t('Cancel'), '$ModalOK' => t('OK'), - '$s_dsel' => datetimesel($f,mktime(),mktime(0,0,0,0,0,$syear+5),mktime($shour,$sminute,$ssecond,$smonth,$sday,$syear),'start_text'), + '$s_dsel' => datetimesel($f,new DateTime(),DateTime::createFromFormat('Y',$syear+5),DateTime::createFromFormat('Y-m-d H:i',"$syear-$smonth-$sday $shour:$sminute"),'start_text'), '$n_text' => t('Finish date/time is not known or not relevant'), '$n_checked' => $n_checked, '$f_text' => t('Event Finishes:'), - '$f_dsel' => datetimesel($f,mktime(),mktime(0,0,0,0,0,$fyear+5),mktime($fhour,$fminute,$fsecond,$fmonth,$fday,$fyear),'finish_text',true,true,'start_text'), + '$f_dsel' => datetimesel($f,new DateTime(),DateTime::createFromFormat('Y',$fyear+5),DateTime::createFromFormat('Y-m-d H:i',"$fyear-$fmonth-$fday $fhour:$fminute"),'finish_text',true,true,'start_text'), '$a_text' => t('Adjust for viewer timezone'), '$a_checked' => $a_checked, '$d_text' => t('Description:'), |