aboutsummaryrefslogtreecommitdiffstats
path: root/mod/events.php
diff options
context:
space:
mode:
authorRedMatrix <info@friendica.com>2014-11-18 08:33:04 +1100
committerRedMatrix <info@friendica.com>2014-11-18 08:33:04 +1100
commit5aba2e82dff5a550aef33f054d27b10602b7dafa (patch)
treecb400e785b59d25f0881491d50d6aa3ca653165b /mod/events.php
parentb11ed7f88e4683315a4f5aa02692cb61facf32a7 (diff)
parente190adc58980c12c6dffb21dae57194aad354e3c (diff)
downloadvolse-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-xmod/events.php9
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:'),