2009-08-24 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_menu.php, include/functions_html.php,
include/functions_events.php, include/functions_messages.php,
include/functions_modules.php, include/functions_exportserver.php,
include/functions_reporting.php, include/functions_filemanager.php,
include/pchart_graph.php, include/pandora_graph.php, include/auth/dev.php,
include/auth/ldap.php, include/auth/mysql.php, include/config.inc.php,
include/functions_networkmap.php, include/functions_servers.php,
include/FusionCharts/FusionCharts_Gen.php,
include/FusionCharts/FusionCharts.php,
include/functions_network_profiles.php, include/gettext.php,
include/functions_network_components.php, include/functions_visual_map.php,
include/fgraph2.php, include/Image/image_functions.php,
include/functions_config.php, include/help/en/help_plugin_parameters.php,
include/help/en/help_snmpcommunity.php, include/help/en/help_wmiquery.php,
include/help/en/help_postprocess.php,
include/help/en/help_prediction_source_module.php,
include/help/en/help_date_format.php, include/help/en/help_recontask.php,
include/help/en/help_alert-matches.php, include/help/en/help_tcp_send.php,
include/help/en/help_wmifield.php, include/help/en/help_duplicateconfig.php,
include/help/en/help_agent_status.php,
include/help/en/help_manage_alerts.php, include/help/en/help_wmikey.php,
include/help/en/help_alert_type.php,
include/help/en/help_network_component.php,
include/help/en/help_time_stamp-comparation.php,
include/help/en/help_eventview.php, include/help/en/help_timesource.php,
include/help/en/help_alert_validation.php,
include/help/en/help_map_builder.php,
include/help/en/help_alert_recovery.php,
include/help/en/help_module_type.php,
include/help/en/help_planned_downtime.php,
include/help/en/help_serverlag.php, include/help/en/help_alerts.php,
include/help/en/help_snmpwalk.php,
include/help/en/help_module_definition.php,
include/help/en/help_plugin_definition.php,
include/help/en/help_wminamespace.php, include/help/en/help_snmpoid.php
include/help/en/help_manageconfig.php,
include/help/es/help_alert_validation.php,
include/help/es/help_plugin_parameters.php,
include/help/es/help_snmpcommunity.php, include/help/es/help_wmiquery.php,
include/help/es/help_map_builder.php, include/help/es/help_postprocess.php,
include/help/es/help_date_format.php,
include/help/es/help_alert_recovery.php,
include/help/es/help_prediction_source_module.php,
include/help/es/help_module_type.php,
include/help/es/help_planned_downtime.php,
include/help/es/help_alert-matches.php, include/help/es/help_recontask.php,
include/help/es/help_alerts.php, include/help/es/help_serverlag.php,
include/help/es/help_snmpwalk.php,
include/help/es/help_module_definition.php,
include/help/es/help_tcp_send.php, include/help/es/help_duplicateconfig.php,
include/help/es/help_wmifield.php, include/help/es/help_manage_alerts.php,
include/help/es/help_wmikey.php, include/help/es/help_plugin_definition.php,
include/help/es/help_alert_type.php, include/help/es/help_snmpoid.php,
include/help/es/help_wminamespace.php,
include/help/es/help_network_component.php,
include/help/es/help_time_stamp-comparation.php,
include/help/es/help_manageconfig.php, include/help/es/help_timesource.php,
include/config_process.php, include/functions_ui.php, include/htmlawed.php,
include/functions_custom_graphs.php, include/fgraph.php,
include/functions_incidents.php, include/functions.php,
include/functions_agents.php, include/functions_db.php,
include/functions_themes.php, include/streams.php,
include/functions_fsgraph.php, include/functions_alerts.php,
include/functions_reports.php, include/functions_extensions.php,
include/functions_ui_renders.php: change comments blocks for delete the
warnings to construct phpDoc Files, give a struct and order in the
phpDoc files.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1881 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-25 19:39:28 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @package Include/help/es
|
|
|
|
*/
|
|
|
|
?>
|
2009-01-30 09:29:31 +01:00
|
|
|
<h1>Origen de tiempo</h1>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
Qué origen de tiempo usar. Esto puede ser (por el momento) el sistema local («Sistema») o la base de datos («Base de datos»).
|
|
|
|
</p>
|
|
|
|
<p>
|
2019-01-30 16:18:44 +01:00
|
|
|
Esto es útil cuando su base de datos no está en el mismo sistema que su servidor Web o los servidores de su <?php echo get_product_name(); ?>.
|
2009-01-30 09:29:31 +01:00
|
|
|
En ese caso cualquier diferencia de tiempo calculará de forma errónea las diferencias de tiempo y marcas de tiempo.
|
2019-01-30 16:18:44 +01:00
|
|
|
Debería usar NTP para sincronizar todos sus servidores de <?php echo get_product_name(); ?> y su servidor de MySQL.
|
2009-01-30 09:29:31 +01:00
|
|
|
Usando estas preferencias no tendrá que sincronizar su servidor web, aún así se recomienda.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
Implemente más orígenes si lo ve necesario (ej. ntp, ldap, $_SERVER...).
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
Nota: La consulta a la base de datos se cacheará la primera vez que se haga, de tal forma que la hora será siempre la misma en la carga de página, mientras que la hora del sistema se devuelve siempre que se llame a la función, lo que puede diferir (especialmene al final de un segundo).
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
Estos ejemplos devuevent todos el tiempo Unix:
|
|
|
|
<script type="text/javascript">
|
|
|
|
var date = new Date; // Objeto de fecha JS genérico
|
|
|
|
var unixtime_ms = date.getTime(); // Devuelve los milisegundos desde la época
|
|
|
|
var unixtime = parseInt(unixtime_ms / 1000);
|
|
|
|
</script>
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<?php
|
2019-01-30 16:18:44 +01:00
|
|
|
$option = ['prominent' => 'timestamp'];
|
2009-01-30 09:29:31 +01:00
|
|
|
?>
|
2019-01-30 16:18:44 +01:00
|
|
|
<b>Hora actual del sistema:</b> <?php ui_print_timestamp(time(), false, $option); ?>
|
2009-01-30 09:29:31 +01:00
|
|
|
<br />
|
2011-03-04 Miguel de Dios <miguel.dedios@artica.es>
* include/db/postgresql.php, include/db/mysql.php, include/functions_db.php:
the function "get_system_time" and derivate functions in DB engines.
* include/functions_gis.php, include/functions_servers.php,
include/help/en/help_timesource.php, include/help/es/help_timesource.php,
include/help/ja/help_timesource.php, include/functions.php,
operation/agentes/estado_agente.php, operation/agentes/gis_view.php,
operation/gis_maps/render_view.php: added the SQL queries PostgreSQL
compatible, in this case with the function to get unix_timestamp.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4058 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-04 13:36:23 +01:00
|
|
|
<b>Hora actual de la base de datos:</b>
|
|
|
|
<?php
|
|
|
|
global $config;
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
switch ($config['dbtype']) {
|
|
|
|
case 'mysql':
|
|
|
|
$timestamp = db_process_sql('SELECT UNIX_TIMESTAMP();');
|
|
|
|
$timestamp = $timestamp[0]['UNIX_TIMESTAMP()'];
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'postgresql':
|
|
|
|
$timestamp = db_get_value_sql("SELECT ceil(date_part('epoch', CURRENT_TIMESTAMP));");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'oracle':
|
|
|
|
$timestamp = db_process_sql("SELECT ceil((sysdate - to_date('19700101000000','YYYYMMDDHH24MISS')) * (86400)) as dt FROM dual");
|
|
|
|
$timestamp = $timestamp[0]['dt'];
|
|
|
|
break;
|
2011-03-04 Miguel de Dios <miguel.dedios@artica.es>
* include/db/postgresql.php, include/db/mysql.php, include/functions_db.php:
the function "get_system_time" and derivate functions in DB engines.
* include/functions_gis.php, include/functions_servers.php,
include/help/en/help_timesource.php, include/help/es/help_timesource.php,
include/help/ja/help_timesource.php, include/functions.php,
operation/agentes/estado_agente.php, operation/agentes/gis_view.php,
operation/gis_maps/render_view.php: added the SQL queries PostgreSQL
compatible, in this case with the function to get unix_timestamp.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4058 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-04 13:36:23 +01:00
|
|
|
}
|
2019-01-30 16:18:44 +01:00
|
|
|
|
|
|
|
ui_print_timestamp($timestamp, false, $option);
|
2011-03-04 Miguel de Dios <miguel.dedios@artica.es>
* include/db/postgresql.php, include/db/mysql.php, include/functions_db.php:
the function "get_system_time" and derivate functions in DB engines.
* include/functions_gis.php, include/functions_servers.php,
include/help/en/help_timesource.php, include/help/es/help_timesource.php,
include/help/ja/help_timesource.php, include/functions.php,
operation/agentes/estado_agente.php, operation/agentes/gis_view.php,
operation/gis_maps/render_view.php: added the SQL queries PostgreSQL
compatible, in this case with the function to get unix_timestamp.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4058 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-04 13:36:23 +01:00
|
|
|
?>
|
2009-01-30 09:29:31 +01:00
|
|
|
<br />
|
|
|
|
<b>Hora de su navegador:</b> <script type="text/javascript">document.write (date);</script>
|
2011-07-12 17:10:42 +02:00
|
|
|
</p>
|