{"id":19642,"date":"2021-04-14T20:32:36","date_gmt":"2021-04-14T20:32:36","guid":{"rendered":"https:\/\/www.engeniustech.com\/?p=19642"},"modified":"2026-02-23T14:36:31","modified_gmt":"2026-02-23T22:36:31","slug":"auto-timezone-detection","status":"publish","type":"post","link":"https:\/\/www.engeniustech.com\/span\/auto-timezone-detection\/","title":{"rendered":"Detecci\u00f3n autom\u00e1tica de zona horaria"},"content":{"rendered":"<div style=\"padding:0 0 0 15pt;\">\n<span style=\"color: #777777; font-size: 1.3em; font-family: manrope; letter-spacing: -1px; font-weight: 700; line-height: 1.5em\">Steven Lin<\/span><span style=\"color: #777777; font-size: 1.7em; font-weight: 100; line-height: 1.5em\">&nbsp;&nbsp;|&nbsp;&nbsp;<\/span><span style=\"color: #8C43FD; font-size: 1.3em; font-family: manrope; letter-spacing: -1px; font-weight: 700; line-height: 1.5em\">Ingeniero de programaci\u00f3n superior<\/span>\n<\/div>\n<p><\/br><\/p>\n<hr>\n<\/hr>\n<p><\/br><br \/>\n<br \/><\/br><\/p>\n<div style=\"padding:0 0 0 15pt; margin:-25pt 0 0 0;\">\n<span style=\"color: #999999; font-size: 1.0em; font-weight: 700; line-height: 1.5em\">RESUMEN - Para registrar datos y operar normalmente, los dispositivos deben mostrar la hora exacta para diferentes pa\u00edses y regiones. Para solucionar este problema, hemos implementado un mecanismo para detectar autom\u00e1ticamente la zona horaria, permitiendo que el dispositivo obtenga la zona horaria que corresponde a la ubicaci\u00f3n actual de la red.<\/span><br \/>\n<br \/><\/br><br \/>\n<span style=\"color: #00aeef; font-size: 1.0em; font-weight: 700; line-height: 1.5em\">I. Introducci\u00f3n<\/span><\/p>\n<p><span style=\"color: #444444; font-size: 1.0em; font-weight: 400; line-height: 1.5em\">La zona horaria es la misma definici\u00f3n horaria de la regi\u00f3n de la Tierra. En 1863, se utiliz\u00f3 por primera vez el concepto de zona horaria. La zona horaria resuelve parcialmente este problema al establecer una hora est\u00e1ndar para la regi\u00f3n. <\/span><\/p>\n<p><span style=\"color: #444444; font-size: 1.0em; font-weight: 400; line-height: 1.5em\">Las m\u00e1quinas de la red utilizan b\u00e1sicamente NTP (Network Time Protocol) para sincronizar sus relojes a trav\u00e9s de Internet. Hay muchos servidores NTP en la red que pueden sincronizar la hora correcta.<\/span><br \/>\n<br \/><\/br><\/p>\n<p><span style=\"color: #00aeef; font-size: 1.0em; font-weight: 700; line-height: 1.5em\">II - C\u00f3mo obtener la zona horaria<\/span><\/p>\n<p><span style=\"color: #444444; font-size: 1.0em; font-weight: 400; line-height: 1.5em\">Para sincronizar la hora correcta con el servidor NTP, el primer paso necesario es proporcionar una zona horaria correspondiente. Para determinar una zona horaria, debemos tener latitud y longitud.<\/span><\/p>\n<p><span style=\"color: #444444; font-size: 1.0em; font-weight: 400; line-height: 1.5em\">Usamos la direcci\u00f3n IP (Protocolo de Internet) como punto de anclaje para obtener la latitud y la longitud, que luego pueden ayudarnos a determinar la zona horaria correcta.<\/span><\/p>\n<p><\/br><br \/>\n<span style=\"color: #00aeef; font-size: 1.0em; font-weight: 700; line-height: 1.5em\">III - Manual a autom\u00e1tico<\/span><\/p>\n<p><span style=\"color: #444444; font-size: 1.0em; font-weight: 400; line-height: 1.5em\">Antes de que podamos implementar el mecanismo de detecci\u00f3n autom\u00e1tica de zona horaria, debemos configurar o seleccionar manualmente la zona horaria del dispositivo a trav\u00e9s de la GUI. Si bien es un inconveniente, configurar la hora manualmente permitir\u00e1 que el dispositivo obtenga la hora autom\u00e1ticamente, eliminando la necesidad de configurarla manualmente. Dado que es m\u00e1s r\u00e1pido y conveniente para el dispositivo consultar autom\u00e1ticamente la zona horaria a trav\u00e9s de la red, implementamos un mecanismo para detectar autom\u00e1ticamente la zona horaria.<\/span><br \/>\n<br \/><\/br><\/p>\n<p><span style=\"color: #00aeef; font-size: 1.0em; font-weight: 700; line-height: 1.5em\">IV - Mecanismo de detecci\u00f3n de zona horaria<\/span><\/p>\n<p><span style=\"color: #444444; font-size: 1.0em; font-weight: 400; line-height: 1.5em\">Debido a que algunos m\u00e9todos en la red solo logran resultados parciales, hemos desarrollado un mecanismo de detecci\u00f3n completo que requiere solo tres condiciones:<\/span><\/p>\n<p><span style=\"color: #444444; font-size: 1.0em; font-weight: 400; line-height: 1.5em\">1. Lista de zonas horarias mundiales<\/span><\/p>\n<p><span style=\"color: #444444; font-size: 1.0em; font-weight: 400; line-height: 1.5em\">2. direcci\u00f3n IP<\/span><\/p>\n<p><span style=\"color: #444444; font-size: 1.0em; font-weight: 400; line-height: 1.5em\">3. El servidor que puede comprobar la zona horaria despu\u00e9s de dar latitud y longitud.<\/span><\/p>\n<p><span style=\"color: #444444; font-size: 1.0em; font-weight: 400; line-height: 1.5em\">Las dos primeras piezas de informaci\u00f3n se pueden proporcionar mediante la preparaci\u00f3n previa y el propio dispositivo. Hay muchos servidores en Internet que brindan servicios de verificaci\u00f3n de zona horaria. Podemos obtener resultados proporcionando la informaci\u00f3n correspondiente al servidor. Luego, actualice la informaci\u00f3n de la zona horaria adquirida en el dispositivo y se completar\u00e1 la implementaci\u00f3n de este m\u00e9todo.<\/span><br \/>\n<br \/><\/br><\/p>\n<p><span style=\"color: #00aeef; font-size: 1.0em; font-weight: 700; line-height: 1.5em\">Conclusi\u00f3n V <\/span><\/p>\n<p><span style=\"color: #444444; font-size: 1.0em; font-weight: 400; line-height: 1.5em\">La forma de establecer la zona horaria solo a trav\u00e9s de la GUI tambi\u00e9n se puede reemplazar por la adquisici\u00f3n autom\u00e1tica. Con este mecanismo de zona horaria de detecci\u00f3n autom\u00e1tica, el dispositivo puede obtener autom\u00e1ticamente la hora correcta. Es m\u00e1s conveniente para el registro de datos y el funcionamiento del sistema.<\/span><br \/>\n<br \/><\/br><\/p>\n<p><span style=\"color: #444444; font-size: 1.0em; font-weight: 700; line-height: 1.5em\">Referencias <\/span><\/p>\n<p><span style=\"color: #999999; font-size: .8em; font-weight: 400; line-height: 1.5em\">1. <a href=\"https:\/\/www.ntppool.org\">Ntppool.org. 2020. Pool.Ntp.Org: El cl\u00faster de servidores Ntp de Internet.<\/a><\/span><br \/>\n<span style=\"color: #999999; font-size: .8em; font-weight: 400; line-height: 1.5em\">2. <a href=\"https:\/\/developers.google.com\/time\">Desarrolladores de Google. 2020. Public NTP | Desarrolladores de Google.<\/a><\/span><\/p>\n<p><\/br><br \/>\n<span style=\"color: #8C43FD; font-size: 1.0em; font-weight: 700; line-height: 1.5em\"><a href=\"https:\/\/www.engeniustech.com\/technical-papers\/auto-timezone-detection.pdf\">Descargar PDF&gt;<\/a><\/span><br \/>\n<br \/><\/br><\/p>\n<hr>\n<\/hr>\n<p><\/br><br \/>\n<span style=\"color: #00aeef; font-size: 1.3em; font-family: manrope; letter-spacing: -1px; font-weight: 700; line-height: 1.5em\"><a href=\"https:\/\/www.engeniustech.com\/span\/engenius-technical-papers.html\/\">Ver todos los art\u00edculos t\u00e9cnicos&gt;<\/a><\/span><br \/>\n<br \/><\/br><\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p><span style=\"color: #1BDFEB; font-weight: 700;\">Documento t\u00e9cnico <\/span>- Para registrar datos y operar normalmente, los dispositivos deben mostrar la hora exacta para diferentes pa\u00edses y regiones. Para solucionar este problema, hemos implementado un mecanismo para detectar autom\u00e1ticamente la zona horaria, permitiendo que el dispositivo obtenga la zona horaria que corresponde a la ubicaci\u00f3n actual de la red.<\/p>","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","inline_featured_image":false,"footnotes":""},"categories":[],"tags":[],"class_list":["post-19642","post","type-post","status-publish","format-standard","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.2 (Yoast SEO v28.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Technical Paper: Auto Timezone Detection - engeniustech EnGenius<\/title>\n<meta name=\"description\" content=\"Auto Timezone Detection: We have implemented a mechanism so that the device will automatically detect the time zone.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.engeniustech.com\/span\/auto-timezone-detection\/\" \/>\n<meta property=\"og:locale\" content=\"es_MX\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Auto Timezone Detection\" \/>\n<meta property=\"og:description\" content=\"Auto Timezone Detection: We have implemented a mechanism so that the device will automatically detect the time zone.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.engeniustech.com\/span\/auto-timezone-detection\/\" \/>\n<meta property=\"og:site_name\" content=\"engeniustech\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/EnGeniusTech\" \/>\n<meta property=\"article:published_time\" content=\"2021-04-14T20:32:36+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-23T22:36:31+00:00\" \/>\n<meta name=\"author\" content=\"Allan Quartucci\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@EnGeniusTech\" \/>\n<meta name=\"twitter:site\" content=\"@EnGeniusTech\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"Allan Quartucci\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tiempo de lectura\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\\\/\\\/www.engeniustech.com\\\/auto-timezone-detection\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.engeniustech.com\\\/auto-timezone-detection\\\/\"},\"author\":{\"name\":\"Allan Quartucci\",\"@id\":\"https:\\\/\\\/www.engeniustech.com\\\/#\\\/schema\\\/person\\\/b56f80659a0b9133459352834db786f1\"},\"headline\":\"Auto Timezone Detection\",\"datePublished\":\"2021-04-14T20:32:36+00:00\",\"dateModified\":\"2026-02-23T22:36:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.engeniustech.com\\\/auto-timezone-detection\\\/\"},\"wordCount\":458,\"publisher\":{\"@id\":\"https:\\\/\\\/www.engeniustech.com\\\/#organization\"},\"inLanguage\":\"es\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.engeniustech.com\\\/auto-timezone-detection\\\/\",\"url\":\"https:\\\/\\\/www.engeniustech.com\\\/auto-timezone-detection\\\/\",\"name\":\"Technical Paper: Auto Timezone Detection - engeniustech EnGenius\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.engeniustech.com\\\/#website\"},\"datePublished\":\"2021-04-14T20:32:36+00:00\",\"dateModified\":\"2026-02-23T22:36:31+00:00\",\"description\":\"Auto Timezone Detection: We have implemented a mechanism so that the device will automatically detect the time zone.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.engeniustech.com\\\/auto-timezone-detection\\\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.engeniustech.com\\\/auto-timezone-detection\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.engeniustech.com\\\/auto-timezone-detection\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.engeniustech.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Auto Timezone Detection\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.engeniustech.com\\\/#website\",\"url\":\"https:\\\/\\\/www.engeniustech.com\\\/\",\"name\":\"EnGenius Technologies\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.engeniustech.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.engeniustech.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.engeniustech.com\\\/#organization\",\"name\":\"EnGenius Technologies\",\"url\":\"https:\\\/\\\/www.engeniustech.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/www.engeniustech.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.engeniustech.com\\\/wp-content\\\/uploads\\\/2024\\\/03\\\/engenius-black-1.jpg\",\"contentUrl\":\"https:\\\/\\\/www.engeniustech.com\\\/wp-content\\\/uploads\\\/2024\\\/03\\\/engenius-black-1.jpg\",\"width\":1500,\"height\":500,\"caption\":\"EnGenius Technologies\"},\"image\":{\"@id\":\"https:\\\/\\\/www.engeniustech.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/EnGeniusTech\",\"https:\\\/\\\/x.com\\\/EnGeniusTech\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/engenius-technologies\\\/mycompany\\\/\"],\"description\":\"Cloud | SD-WAN Gateways | PDUs | Switches | WiFi\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.engeniustech.com\\\/#\\\/schema\\\/person\\\/b56f80659a0b9133459352834db786f1\",\"name\":\"Allan Quartucci\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Technical Paper: Auto Timezone Detection - engeniustech EnGenius","description":"Auto Timezone Detection: We have implemented a mechanism so that the device will automatically detect the time zone.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.engeniustech.com\/span\/auto-timezone-detection\/","og_locale":"es_MX","og_type":"article","og_title":"Auto Timezone Detection","og_description":"Auto Timezone Detection: We have implemented a mechanism so that the device will automatically detect the time zone.","og_url":"https:\/\/www.engeniustech.com\/span\/auto-timezone-detection\/","og_site_name":"engeniustech","article_publisher":"https:\/\/www.facebook.com\/EnGeniusTech","article_published_time":"2021-04-14T20:32:36+00:00","article_modified_time":"2026-02-23T22:36:31+00:00","author":"Allan Quartucci","twitter_card":"summary_large_image","twitter_creator":"@EnGeniusTech","twitter_site":"@EnGeniusTech","twitter_misc":{"Escrito por":"Allan Quartucci","Tiempo de lectura":"2 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/www.engeniustech.com\/auto-timezone-detection\/#article","isPartOf":{"@id":"https:\/\/www.engeniustech.com\/auto-timezone-detection\/"},"author":{"name":"Allan Quartucci","@id":"https:\/\/www.engeniustech.com\/#\/schema\/person\/b56f80659a0b9133459352834db786f1"},"headline":"Auto Timezone Detection","datePublished":"2021-04-14T20:32:36+00:00","dateModified":"2026-02-23T22:36:31+00:00","mainEntityOfPage":{"@id":"https:\/\/www.engeniustech.com\/auto-timezone-detection\/"},"wordCount":458,"publisher":{"@id":"https:\/\/www.engeniustech.com\/#organization"},"inLanguage":"es"},{"@type":"WebPage","@id":"https:\/\/www.engeniustech.com\/auto-timezone-detection\/","url":"https:\/\/www.engeniustech.com\/auto-timezone-detection\/","name":"Technical Paper: Auto Timezone Detection - engeniustech EnGenius","isPartOf":{"@id":"https:\/\/www.engeniustech.com\/#website"},"datePublished":"2021-04-14T20:32:36+00:00","dateModified":"2026-02-23T22:36:31+00:00","description":"Auto Timezone Detection: We have implemented a mechanism so that the device will automatically detect the time zone.","breadcrumb":{"@id":"https:\/\/www.engeniustech.com\/auto-timezone-detection\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.engeniustech.com\/auto-timezone-detection\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.engeniustech.com\/auto-timezone-detection\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.engeniustech.com\/"},{"@type":"ListItem","position":2,"name":"Auto Timezone Detection"}]},{"@type":"WebSite","@id":"https:\/\/www.engeniustech.com\/#website","url":"https:\/\/www.engeniustech.com\/","name":"Tecnolog\u00edas EnGenius","description":"","publisher":{"@id":"https:\/\/www.engeniustech.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.engeniustech.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Organization","@id":"https:\/\/www.engeniustech.com\/#organization","name":"Tecnolog\u00edas EnGenius","url":"https:\/\/www.engeniustech.com\/","logo":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.engeniustech.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.engeniustech.com\/wp-content\/uploads\/2024\/03\/engenius-black-1.jpg","contentUrl":"https:\/\/www.engeniustech.com\/wp-content\/uploads\/2024\/03\/engenius-black-1.jpg","width":1500,"height":500,"caption":"EnGenius Technologies"},"image":{"@id":"https:\/\/www.engeniustech.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/EnGeniusTech","https:\/\/x.com\/EnGeniusTech","https:\/\/www.linkedin.com\/company\/engenius-technologies\/mycompany\/"],"description":"Nube | Puertas de enlace SD-WAN | PDU | Conmutadores | Wi-Fi"},{"@type":"Person","@id":"https:\/\/www.engeniustech.com\/#\/schema\/person\/b56f80659a0b9133459352834db786f1","name":"Allan Quartucci"}]}},"_links":{"self":[{"href":"https:\/\/www.engeniustech.com\/span\/wp-json\/wp\/v2\/posts\/19642","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.engeniustech.com\/span\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.engeniustech.com\/span\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.engeniustech.com\/span\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.engeniustech.com\/span\/wp-json\/wp\/v2\/comments?post=19642"}],"version-history":[{"count":17,"href":"https:\/\/www.engeniustech.com\/span\/wp-json\/wp\/v2\/posts\/19642\/revisions"}],"predecessor-version":[{"id":20042,"href":"https:\/\/www.engeniustech.com\/span\/wp-json\/wp\/v2\/posts\/19642\/revisions\/20042"}],"wp:attachment":[{"href":"https:\/\/www.engeniustech.com\/span\/wp-json\/wp\/v2\/media?parent=19642"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.engeniustech.com\/span\/wp-json\/wp\/v2\/categories?post=19642"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.engeniustech.com\/span\/wp-json\/wp\/v2\/tags?post=19642"}],"curies":[{"name":"gracias","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}