Página 1 de 3

[Resolvido] Ajustar Fuso Horário da Loja

Enviado: 24 Ago 2013, 04:25
por dam3000
Amigos,

Estou com um pequeno problema. Estou tentando ajustar o fuso horário do opencart, mas não estou obtendo êxito.

Modifiquei o arquivo startup.php da Pasta System, alterando:

DE:

if (!ini_get('date.timezone')) {

date_default_timezone_set('UTC');

PARA:

if (!ini_get('date.timezone')) {

date_default_timezone_set('America/Sao_Paulo');


Mas nada de corrigir.

Quem puder ajudar, desde já, muito grato!

Att, Dam!

Re: Ajustar Fuso Horário da Loja

Enviado: 26 Ago 2013, 03:03
por valdeir2000

Re: Ajustar Fuso Horário da Loja

Enviado: 18 Nov 2013, 08:03
por rogerio.dobler
É só colocar esta linha no .htacess:

php_value date.timezone 'America/Sao_Paulo'

e esta resolvido o problema do fusorario?

por exemplo, estou hospedado na hostgator, e o datacenter deles é nos EUA e sempre os pedidos e tudo mais saem com uma diferença de 3 horas adiantadas... fazendo isso estará resolvido este problema?

Re: Ajustar Fuso Horário da Loja

Enviado: 18 Nov 2013, 13:26
por rogerio.dobler
Inseri esta linha no .htaccess da minha loja e a loja não abriu mais...

php_value date.timezone 'America/Sao_Paulo'

como deve ser feito?

Re: Ajustar Fuso Horário da Loja

Enviado: 18 Nov 2013, 14:29
por juliocesar757
Aparentemente está correto. Tente trocar as aspas simples por dupla... talvez seja isso:
Código: Selecionar todos
php_value date.timezone "America/Sao_Paulo"

Re: Ajustar Fuso Horário da Loja

Enviado: 20 Nov 2013, 07:57
por rogerio.dobler
juliocesar757 escreveu:Aparentemente está correto. Tente trocar as aspas simples por dupla... talvez seja isso:
Código: Selecionar todos
php_value date.timezone "America/Sao_Paulo"
então testei tambem deu erro...

erro: 500 - INTERNAL SERVER ERROR

coloquei no final do .htaccess... será por que ta dando isso?

sera q é problema na hospedagem? to na HostGator

Re: Ajustar Fuso Horário da Loja

Enviado: 20 Nov 2013, 12:44
por AllexWesley
rogerio.dobler escreveu:
juliocesar757 escreveu:Aparentemente está correto. Tente trocar as aspas simples por dupla... talvez seja isso:
Código: Selecionar todos
php_value date.timezone "America/Sao_Paulo"
então testei tambem deu erro...

erro: 500 - INTERNAL SERVER ERROR

coloquei no final do .htaccess... será por que ta dando isso?

sera q é problema na hospedagem? to na HostGator
Uso o mesmo código na Hostgator e não está dando nenhum erro estranho.

Re: Ajustar Fuso Horário da Loja

Enviado: 20 Nov 2013, 12:53
por rogerio.dobler
AllexWesley escreveu:
rogerio.dobler escreveu:
juliocesar757 escreveu:Aparentemente está correto. Tente trocar as aspas simples por dupla... talvez seja isso:
Código: Selecionar todos
php_value date.timezone "America/Sao_Paulo"
então testei tambem deu erro...

erro: 500 - INTERNAL SERVER ERROR

coloquei no final do .htaccess... será por que ta dando isso?

sera q é problema na hospedagem? to na HostGator
Uso o mesmo código na Hostgator e não está dando nenhum erro estranho.
muito estranho mesmo....

tu poderia fazer o favor de postar o teu .htacces aki para eu ver se introduzi corretamente?

Re: Ajustar Fuso Horário da Loja

Enviado: 20 Nov 2013, 15:14
por AllexWesley
Código: Selecionar todos
# 1.To use URL Alias you need to be running apache with mod_rewrite enabled. 

# 2. In your opencart directory rename htaccess.txt to .htaccess.

# For any support issues please visit: http://www.opencart.com

Options +FollowSymlinks

# Prevent Directoy listing 
Options -Indexes

# Prevent Direct Access to files
<FilesMatch "\.(tpl|ini|log)">
 Order deny,allow
 Deny from all
</FilesMatch>

# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/ 

RewriteBase /
RewriteCond %{HTTP_HOST} ^dominio.com.br [NC]
RewriteRule ^(.*)$ http://www.dominio.com.br/$1 [R=301,L]
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^download/(.*) /index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

### Additional Settings that may need to be enabled for some servers 
### Uncomment the commands by removing the # sign in front of it.
### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that.

# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:
# php_flag register_globals off

# 2. If your cart has magic quotes enabled, This may work to disable it:
# php_flag magic_quotes_gpc Off

# 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try
# php_value upload_max_filesize 999M

# 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value post_max_size 999M

# 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_execution_time 200

# 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_input_time 200

# 7. disable open_basedir limitations
# php_admin_value open_basedir none

# 8. SET Time-Zone 
php_value date.timezone 'America/Sao_Paulo'

<IfModule mod_autoindex.c>
    Options -Indexes
</IfModule>

<IfModule mod_rewrite.c>
	RewriteCond %{SCRIPT_FILENAME} -d [OR]
	RewriteCond %{SCRIPT_FILENAME} -f
	RewriteRule "(^|/)\." - [F]
</IfModule>

<ifModule mod_gzip.c>
  mod_gzip_on Yes
  mod_gzip_dechunk Yes
  mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
  mod_gzip_item_include handler ^cgi-script$
  mod_gzip_item_include mime ^text/.*
  mod_gzip_item_include mime ^application/x-javascript.*
  mod_gzip_item_exclude mime ^image/.*
  mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>

<ifModule mod_expires.c>
  ExpiresActive On
  ExpiresDefault "access plus 1 seconds"
  ExpiresByType text/html "access plus 1 seconds"
  ExpiresByType image/gif "access plus 2592000 seconds"
  ExpiresByType image/jpeg "access plus 2592000 seconds"
  ExpiresByType image/png "access plus 2592000 seconds"
  ExpiresByType text/css "access plus 604800 seconds"
  ExpiresByType text/javascript "access plus 216000 seconds"
  ExpiresByType application/x-javascript "access plus 216000 seconds"
</ifModule>

<ifModule mod_headers.c>
  <filesMatch "\\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$">
    Header set Cache-Control "max-age=2592000, public"
  </filesMatch>
  <filesMatch "\\.(css)$">
    Header set Cache-Control "max-age=604800, public"
  </filesMatch>
  <filesMatch "\\.(js)$">
    Header set Cache-Control "max-age=216000, private"
  </filesMatch>
  <filesMatch "\\.(xml|txt)$">
    Header set Cache-Control "max-age=216000, public, must-revalidate"
  </filesMatch>
  <filesMatch "\\.(html|htm|php)$">
    Header set Cache-Control "max-age=1, private, must-revalidate"
  </filesMatch>
</ifModule>

Re: Ajustar Fuso Horário da Loja

Enviado: 21 Nov 2013, 09:42
por rogerio.dobler
é o meu realmente não quer funcionar... não entendo o porque..

olha o mey codigo do .htaccess
Código: Selecionar todos
# 1.To use URL Alias you need to be running apache with mod_rewrite enabled. 

# 2. In your opencart directory rename htaccess.txt to .htaccess.

# For any support issues please visit: http://www.opencart.com

Options +FollowSymlinks

# Prevent Directoy listing 
Options -Indexes

# Prevent Direct Access to files
<FilesMatch "\.(tpl|ini|log)">
 Order deny,allow
 Deny from all
</FilesMatch>

<FilesMatch ^config.php$>
Deny from all
</FilesMatch>

# SEO URL Settings
RewriteEngine On
RewriteCond %{HTTP_HOST} ^shoppingdasorquideas.com.br
RewriteRule ^ http://www.shoppingdasorquideas.com.br%{REQUEST_URI} [L,R=301]

Leia mais: http://www.ndig.com.br/item/2010/06/redirecionando-o-endereo-web-com-ou-sem-www-com-o-htaccess#ixzz2lHZdiWip
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/ 

RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^download/(.*) /index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

### Additional Settings that may need to be enabled for some servers 
### Uncomment the commands by removing the # sign in front of it.
### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that.

# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:
# php_flag register_globals off

# 2. If your cart has magic quotes enabled, This may work to disable it:
# php_flag magic_quotes_gpc Off

# 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try
# php_value upload_max_filesize 999M

# 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value post_max_size 999M

# 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_execution_time 200

# 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_input_time 200

# 7. disable open_basedir limitations
# php_admin_value open_basedir none

# 8. SET Time-Zone 
php_value date.timezone 'America/Sao_Paulo'

<IfModule mod_autoindex.c>
    Options -Indexes
</IfModule>

<IfModule mod_rewrite.c>
   RewriteCond %{SCRIPT_FILENAME} -d [OR]
   RewriteCond %{SCRIPT_FILENAME} -f
   RewriteRule "(^|/)\." - [F]
</IfModule>

<ifModule mod_gzip.c>
  mod_gzip_on Yes
  mod_gzip_dechunk Yes
  mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
  mod_gzip_item_include handler ^cgi-script$
  mod_gzip_item_include mime ^text/.*
  mod_gzip_item_include mime ^application/x-javascript.*
  mod_gzip_item_exclude mime ^image/.*
  mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>

<ifModule mod_expires.c>
  ExpiresActive On
  ExpiresDefault "access plus 1 seconds"
  ExpiresByType text/html "access plus 1 seconds"
  ExpiresByType image/gif "access plus 2592000 seconds"
  ExpiresByType image/jpeg "access plus 2592000 seconds"
  ExpiresByType image/png "access plus 2592000 seconds"
  ExpiresByType text/css "access plus 604800 seconds"
  ExpiresByType text/javascript "access plus 216000 seconds"
  ExpiresByType application/x-javascript "access plus 216000 seconds"
</ifModule>

<ifModule mod_headers.c>
  <filesMatch "\\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$">
    Header set Cache-Control "max-age=2592000, public"
  </filesMatch>
  <filesMatch "\\.(css)$">
    Header set Cache-Control "max-age=604800, public"
  </filesMatch>
  <filesMatch "\\.(js)$">
    Header set Cache-Control "max-age=216000, private"
  </filesMatch>
  <filesMatch "\\.(xml|txt)$">
    Header set Cache-Control "max-age=216000, public, must-revalidate"
  </filesMatch>
  <filesMatch "\\.(html|htm|php)$">
    Header set Cache-Control "max-age=1, private, must-revalidate"
  </filesMatch>
</ifModule>
simplismente da erro 500