Bienvenido, Invitado
Nombre de Usuario: Contraseña: Recordarme

TEMA: How to change time zone?

How to change time zone? 7 años 6 meses ago #20237

  • Houndy
  • Avatar de Houndy
  • Offline
  • Visitante
  • Mensajes: 11
  • Gracias recibidas 2
  • Karma: 2
In Finland, it's daylight saving time now and since Kide doesn't automatically change time zone, I would like know how to do it manually so times will be correct again. There isn't sychnronize time button in the front options(there's only the Optimize delay button and it doesn't help in this case) so code changes are needed.
if ($user_config->load("gmt") === null)
			$doc->addScriptDeclaration('
	var tiempo = new Date();
	kide.save_config("gmt", (tiempo.getTimezoneOffset()/60)*-1);');
Above is probably the part of the code I should edit but how I should edit it?

I would like to suggest that in the future, make Kide automatically get time settings from Joomla.
Última Edición: 7 años 6 meses ago por Houndy.
El administrador ha desactivado la escritura pública.

Re: How to change time zone? 7 años 6 meses ago #20251

  • JoniJnm
  • Avatar de JoniJnm
  • Offline
  • Administrador
  • Mensajes: 4579
  • Gracias recibidas 544
  • Karma: 160
Hi,

Kide can get time automatically from Joomla, but there are users from diferent countries that go to your website.

With this script, Kide gets the time from the PC of the user. Kide stores in db the time with gtm+0 and, to show it, kide apply the user's gmt.

The gmt is saved in a cookie, since time change maybe it show one hour of delay. So you can delete the line:
if ($user_config->load("gmt") === null)
Última Edición: 7 años 6 meses ago por JoniJnm.
El administrador ha desactivado la escritura pública.
Tiempo de carga de la página: 0.091 segundos