Italian (Italy)
Knowledge Base  >  Vik Booking  >  Date, Periodi & Calendari  >  Il tempo è spostato di qualche ora

If the time displayed in the front-end or in the back-end of your website is not reflecting your Local Time, then the problem is caused by a Timezone difference.
For example, if you have just received a booking and the time displayed is one or a few hours ahead or back your current Local Time, the Timezone of your Server is different than your Local Time.

From the WordPress Administrator Settings Page you can choose your local Timezone and the system will attempt to force the Server to use that Timezone. However, most of the times this operation will not fix the Timezone issue of your website because of some Server restrictions.

If changing the Timezone from the Settings Page will not solve the problem then it is necessary to override it in a different way. This is because some PHP functions used by the extension to format Dates or generate Unix timestamps, take the time directly from the server so overriding the Timezone via PHP will not help.

There are two ways for overriding the Server default Timezone:

  1. Set it from the .htaccess file in the root folder of your website. This solution works only for those web servers running Apache.
  2. Change the default Timezone directly from the PHP.INI configuration file of your Server. Usually, only your Hosting Company is able to access and modify the PHP Configuration, especially if your space is a Virtual Host.

By opening the file .htaccess, which is located in the root folder of your website, with a good text editor, you should place the code below within a specific section of the file:

## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
SetEnv TZ Europe/Rome
## End - Custom redirects

By placing the instruction SetEnv TZ Europe/Rome in that specific part of the file .htaccess, we ensure to not be causing problems to the other Apache Rules.

The instruction SetEnv TZ Europe/Rome will force the Timezone of the server to Rome time. The correct syntax is "SetEnv TZ Location" where SetEnv TZ is a special directive of Apache to define the Timezone and Location is the actual location of the Timezone you want to use.

You can find a complete list of supported Timezone at the URL below:
http://www.php.net/manual/en/timezones.php

By saving the modified file .htaccess and by re-uploading it onto your server, the time of the bookings should reflect your Local time.

If this modification will not affect anything then you should contact your Hosting Company so that they can change the Server Timezone directly from the PHP.INI Configuration file.

Ultimo aggiornamento: 2019-11-26
Utile?
40% delle persone lo ha trovato utile.

Questo sito web utilizza i cookie

Questo sito web utilizza cookie e tecnologie simili. Alcune di queste tecnologie sono necessarie per il corretto funzionamento del sito web (essenziali). Altre tecnologie sono utilizzate per valutare il comportamento degli utenti (analisi), per integrare media esterni o per scopi pubblicitari. Se l'utente accetta, queste tecnologie vengono attivate. I dettagli sono riportati nella Privacy Policy. Da questa stessa pagina è inoltre possibile aggiornare/revocare il consenso. Se non si fornisce il consenso, verranno attivati solo i cookie con funzioni essenziali.

Sul nostro sito web utilizziamo tecnologie provenienti dagli Stati Uniti. Pertanto, se acconsentite, acconsentite anche al trasferimento dei vostri dati negli Stati Uniti. Desideriamo sottolineare che gli Stati Uniti non hanno un livello di protezione dei dati paragonabile a quello dell'Unione Europea e che qualsiasi azienda statunitense può essere obbligata dalle autorità statali a consegnare i vostri dati senza che voi abbiate alcuno strumento efficace di protezione legale contro questo.