{"id":1233,"date":"2021-10-20T19:09:28","date_gmt":"2021-10-20T23:09:28","guid":{"rendered":"https:\/\/www.neothek.com\/soporte\/?post_type=kb&#038;p=1233"},"modified":"2022-04-28T17:49:43","modified_gmt":"2022-04-28T21:49:43","slug":"ajustar-la-zona-horaria-en-php-ini-para-archivos-php","status":"publish","type":"kb","link":"https:\/\/www.neothek.com\/soporte\/articulo\/ajustar-la-zona-horaria-en-php-ini-para-archivos-php\/","title":{"rendered":"Ajustar la zona horaria en php.ini para archivos php"},"content":{"rendered":"<div class=\"col-span-12\">\n<div class=\"well\">\n<p>Si observa la hora incorrecta en sus scripts <strong>PHP<\/strong>, es posible que el servidor que aloja su sitio Web se encuentra en una zona horaria diferente por defecto. Sin embargo puede modificar la hora insertando una l\u00ednea de c\u00f3digo en su archivo <strong>php.ini<\/strong><\/p>\n<p>La ubicaci\u00f3n establecida en el c\u00f3digo determinar\u00e1 el tiempo que se mostrar\u00e1 en sus scripts PHP.<\/p>\n<h2>Establecer la zona horaria en PHP<\/h2>\n<p><strong>Paso 1.-<\/strong>\u00a0Abra el archivo php.ini con el Gestor de archivos en cPanel<\/p>\n<p><strong>Paso 2.-<\/strong>\u00a0Agregue la siguiente l\u00ednea de c\u00f3digo al principio del archivo php.ini<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">date.timezone = \"US\/Central\"<\/pre>\n<p><strong>Paso 3.-<\/strong>\u00a0Reemplazar \u00abUS\/Central\u00bb \u200b\u200bcon la zona horaria que corresponda con el tiempo que desea mostrar,<a title=\"zona horaria\" href=\"http:\/\/www.php.net\/manual\/es\/timezones.php\">\u00a0click\u00a0aca<\/a>\u00a0\u00a0para \u00a0ver la lista de las zonas horarias soportadas<\/p>\n<p><strong>Paso 4.-<\/strong>\u00a0Haga clic en \u00abGuardar\u00bb<\/p>\n<p><strong>Paso 5.-<\/strong>\u00a0Ahora, usted puede consultar su phpinfo.php para verificar que el cambio se llev\u00f3 a cabo<\/p>\n<div class=\"pt-5\"><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter wp-image-1268 size-full\" src=\"https:\/\/www.neothek.com\/soporte\/wp-content\/uploads\/2021\/10\/timezone_phpini_3.jpg\" alt=\"\" width=\"621\" height=\"298\" srcset=\"https:\/\/www.neothek.com\/soporte\/wp-content\/uploads\/2021\/10\/timezone_phpini_3.jpg 621w, https:\/\/www.neothek.com\/soporte\/wp-content\/uploads\/2021\/10\/timezone_phpini_3-300x144.jpg 300w\" sizes=\"(max-width: 621px) 100vw, 621px\" \/><\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Si observa la hora incorrecta en sus scripts PHP, es posible que el servidor que aloja su sitio Web se encuentra en una zona horaria diferente por defecto. Sin embargo puede modificar la hora insertando una l\u00ednea de c\u00f3digo en su archivo php.ini La ubicaci\u00f3n establecida en el c\u00f3digo determinar\u00e1 el tiempo que se mostrar\u00e1 [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"kbtopic":[13],"kbtag":[57,60,59,61,58],"class_list":["post-1233","kb","type-kb","status-publish","hentry","kbtopic-web-hosting","kbtag-hora","kbtag-hora-hosting","kbtag-hora-php","kbtag-zona","kbtag-zona-horaria-php"],"_links":{"self":[{"href":"https:\/\/www.neothek.com\/soporte\/wp-json\/wp\/v2\/kb\/1233","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.neothek.com\/soporte\/wp-json\/wp\/v2\/kb"}],"about":[{"href":"https:\/\/www.neothek.com\/soporte\/wp-json\/wp\/v2\/types\/kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.neothek.com\/soporte\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.neothek.com\/soporte\/wp-json\/wp\/v2\/comments?post=1233"}],"version-history":[{"count":6,"href":"https:\/\/www.neothek.com\/soporte\/wp-json\/wp\/v2\/kb\/1233\/revisions"}],"predecessor-version":[{"id":2000,"href":"https:\/\/www.neothek.com\/soporte\/wp-json\/wp\/v2\/kb\/1233\/revisions\/2000"}],"wp:attachment":[{"href":"https:\/\/www.neothek.com\/soporte\/wp-json\/wp\/v2\/media?parent=1233"}],"wp:term":[{"taxonomy":"kbtopic","embeddable":true,"href":"https:\/\/www.neothek.com\/soporte\/wp-json\/wp\/v2\/kbtopic?post=1233"},{"taxonomy":"kbtag","embeddable":true,"href":"https:\/\/www.neothek.com\/soporte\/wp-json\/wp\/v2\/kbtag?post=1233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}