diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php index 5b577d19a7d..2da8ebf02bc 100644 --- a/htdocs/admin/system/dolibarr.php +++ b/htdocs/admin/system/dolibarr.php @@ -141,17 +141,17 @@ $dec=$langs->trans("SeparatorDecimal"); print ''.$langs->trans("CurrentValueSeparatorDecimal").''.$dec.''."\n"; // Show results of functions to see if everything works $var=!$var; -print '=> price2num(1233.56+1)'.price2num(1233.56+1,'2').''; +print '  => price2num(1233.56+1)'.price2num(1233.56+1,'2').''; $var=!$var; -print "=> price2num('."'1".$thousand."234".$dec."56')".price2num("1".$thousand."234".$dec."56",'2').""; +print "  => price2num('."'1".$thousand."234".$dec."56')".price2num("1".$thousand."234".$dec."56",'2').""; if (($thousand != ',' && $thousand != '.') || ($thousand != ' ')) { $var=!$var; - print "=> price2num('."'1 234.56')".price2num("1 234.56",'2').""; + print "  => price2num('."'1 234.56')".price2num("1 234.56",'2').""; print "\n"; } $var=!$var; -print '=> price(1234.56)'.price(1234.56).''; +print '  => price(1234.56)'.price(1234.56).''; // Timezone $txt =$langs->trans("OSTZ").' (variable system TZ): '.($_ENV["TZ"]?$_ENV["TZ"]:$langs->trans("NotDefined")).'
'."\n"; $txt.=$langs->trans("PHPTZ").' (php.ini date.timezone): '.(ini_get("date.timezone")?ini_get("date.timezone"):$langs->trans("NotDefined")).''."\n"; // date.timezone must be in valued defined in http://fr3.php.net/manual/en/timezones.europe.php @@ -160,6 +160,7 @@ if (function_exists('date_default_timezone_get')) $var=!$var; print ''.$langs->trans("CurrentTimeZone").''; // Timezone server PHP $a=date_default_timezone_get(); + $a.=' '.getCurrentTimeZone(); $a.=' ('.(-dol_mktime(0,0,0,1,1,1970)>0?'+':'').(-dol_mktime(0,0,0,1,1,1970)).')'; print $form->textwithtooltip($a,$txt,2,1,img_info('')); print ''."\n"; // value defined in http://fr3.php.net/manual/en/timezones.europe.php @@ -173,27 +174,34 @@ else print ''."\n"; } $var=!$var; -print '=> '.$langs->trans("CurrentHour").''.dol_print_date(dol_now(),'dayhour','tzserver').''."\n"; +print '  => '.$langs->trans("CurrentHour").''.dol_print_date(dol_now(),'dayhour','tzserver').''."\n"; $var=!$var; -print '=> dol_print_date(0,"dayhourtext")'.dol_print_date(0,"dayhourtext").''; +print '  => dol_print_date(0,"dayhourtext")'.dol_print_date(0,"dayhourtext").''; $var=!$var; -print '=> dol_get_first_day(1970,1,false)'.dol_get_first_day(1970,1,false).'     (=> dol_print_date() or idate() of this value = '.dol_print_date(dol_get_first_day(1970,1,false),'dayhour').')'; +print '  => dol_get_first_day(1970,1,false)'.dol_get_first_day(1970,1,false).'     (=> dol_print_date() or idate() of this value = '.dol_print_date(dol_get_first_day(1970,1,false),'dayhour').')'; $var=!$var; -print '=> dol_get_first_day(1970,1,true)'.dol_get_first_day(1970,1,true).'     (=> dol_print_date() or idate() of this value = '.dol_print_date(dol_get_first_day(1970,1,true),'dayhour').')'; +print '  => dol_get_first_day(1970,1,true)'.dol_get_first_day(1970,1,true).'     (=> dol_print_date() or idate() of this value = '.dol_print_date(dol_get_first_day(1970,1,true),'dayhour').')'; // Parent company $var=!$var; print ''.$langs->trans("CompanyTZ").''.$langs->trans("FeatureNotYetAvailable").''."\n"; $var=!$var; -print '=> '.$langs->trans("CompanyHour").''.$langs->trans("FeatureNotYetAvailable").''."\n"; +print '  => '.$langs->trans("CompanyHour").''.$langs->trans("FeatureNotYetAvailable").''."\n"; // Client $var=!$var; print ''.$langs->trans("ClientTZ").''.($_SESSION['dol_tz']!=''?($_SESSION['dol_tz']>=0?'+':'').$_SESSION['dol_tz']:'').' ('.($_SESSION['dol_tz']>=0?'+':'').($_SESSION['dol_tz']*60*60).')'."\n"; //$var=!$var; -//print '=> '.$langs->trans("ClientOffsetWithGreenwich").''..''."\n"; +//print '  => '.$langs->trans("ClientOffsetWithGreenwich").''..''."\n"; $var=!$var; -print ''.$langs->trans("DaylingSavingTime").''.($_SESSION['dol_dst']>=0?yn(1):yn(0)).' ('.($_SESSION['dol_dst']>=0?'+':'').($_SESSION['dol_dst']*60*60).')'."\n"; +print ''.$langs->trans("DaylingSavingTime").''; +if ($_SESSION['dol_dst']>0) +{ + print ($_SESSION['dol_dst']>0?'+':'').($_SESSION['dol_dst']).' ('.($_SESSION['dol_dst']>0?'+':'').($_SESSION['dol_dst']*60*60).')'; +} +else print yn(0); +if (isset($_SESSION['dol_dst_first'])) print '     ('.dol_print_date(dol_stringtotime($_SESSION['dol_dst_first']),'dayhour','gmt').' - '.dol_print_date(dol_stringtotime($_SESSION['dol_dst_second']),'dayhour','gmt').')'; +print ''."\n"; $var=!$var; -print '=> '.$langs->trans("ClientHour").''.dol_print_date(dol_now(),'dayhour','tzuser').''."\n"; +print '  => '.$langs->trans("ClientHour").''.dol_print_date(dol_now(),'dayhour','tzuser').''."\n"; $var=!$var; $filesystemencoding=ini_get("unicode.filesystem_encoding"); // Disponible avec PHP 6.0 @@ -204,7 +212,7 @@ $tmp=ini_get("unicode.filesystem_encoding"); // Disponible avec PHP 6.0 if (empty($tmp) && ! empty($_SERVER["WINDIR"])) $tmp='iso-8859-1'; // By default for windows if (empty($tmp)) $tmp='utf-8'; // By default for other if (! empty($conf->global->MAIN_FILESYSTEM_ENCODING)) $tmp=$conf->global->MAIN_FILESYSTEM_ENCODING; -print '=> '.$langs->trans("File encoding").''.$tmp.''."\n"; // date.timezone must be in valued defined in http://fr3.php.net/manual/en/timezones.europe.php +print '  => '.$langs->trans("File encoding").''.$tmp.''."\n"; // date.timezone must be in valued defined in http://fr3.php.net/manual/en/timezones.europe.php print ''; print '
'; diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 31a6d112c45..be196fc52c9 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -553,16 +553,15 @@ if (count($listofextcals)) $event->id=$icalevent['UID']; $event->icalname=$namecal; $event->icalcolor=$colorcal; - //$usertime=($_SESSION['dol_tz']*60*60)+($_SESSION['dol_dst']*60*60); $usertime=0; // We dont modify date because we want to have date into memory datep and datef stored as GMT date. Compensation will be done during output. $event->datep=$datestart+$usertime; $event->datef=$dateend+$usertime; $event->type_code="ICALEVENT"; - + if($icalevent['SUMMARY']) $event->libelle=$icalevent['SUMMARY']; elseif($icalevent['DESCRIPTION']) $event->libelle=dol_nl2br($icalevent['DESCRIPTION'],1); else $event->libelle = $langs->trans("ExtSiteNoLabel"); - + $event->date_start_in_calendar=$event->datep; if ($event->datef != '' && $event->datef >= $event->datep) $event->date_end_in_calendar=$event->datef; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 1d644f6d6e0..a6bb6220963 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -142,7 +142,7 @@ class Form } return $ret; } - + /** * Output edit in place form * @@ -156,14 +156,14 @@ class Form function editInPlace($value, $htmlname, $condition, $inputType='textarea', $inputOption='') { global $conf; - + $out=''; - + // Check parameters if ($inputType == 'textarea') $value = dol_nl2br($value); else if ($inputType == 'numeric') $value = price($value); else if ($inputType == 'datepicker') $value = dol_print_date($value, 'day'); - + if (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE) && $condition) { if ($inputType == 'datepicker') @@ -185,7 +185,7 @@ class Form $inputType = 'textarea'; } } - + $out.= '
'; $out.= $value; $out.= '
'; @@ -194,7 +194,7 @@ class Form { $out = $value; } - + return $out; } @@ -355,11 +355,11 @@ class Form } array_multisort($label, SORT_ASC, $countryArray); - + foreach ($countryArray as $row) { //print 'rr'.$selected.'-'.$row['label'].'-'.$row['code_iso'].'
'; - if ($selected && $selected != '-1' && ($selected == $row['rowid'] || $selected == $row['code_iso'] || $selected == $row['label']) ) + if ($selected && $selected != '-1' && ($selected == $row['rowid'] || $selected == $row['code_iso'] || $selected == $row['label']) ) { $foundselected=true; $out.= '