Timezone (we_conf)

Michael_S
Senior Member
Beiträge: 160
Registriert: Mi 4. Feb 2004, 02:39
Wohnort: London / UK
Kontaktdaten:

Timezone (we_conf)

Beitragvon Michael_S » Di 7. Feb 2012, 14:37

Hi,

webEdition version: 6.2.6.0 (SVN-Revision: 3624) official release

I'm having problems configuring the timezone and can only display the default value of 'Europe/Berlin'. I've manually updated the we_conf.inc.php for my timezone from 'date_default_timezone_set('Europe/Berlin')' to 'date_default_timezone_set('Europe/London')' but the page still outputs the default value?

we_conf.inc.php

Code: Alles auswählen

if (!date_default_timezone_set(@date_default_timezone_get())){
   date_default_timezone_set('Europe/London');
}
define("DATETIME_INITIALIZED",'1'); // to prevent additional initialization in we_defines und autoload, this allows later to make that an settings-item

Template

Code: Alles auswählen

<we:input type="date" name="Date" format="l dS F, Y - H:i e" />

Output

Code: Alles auswählen

Thursday 02nd February, 2012 - 10:47 Europe/Berlin
Production Area
London, UK
http://productionarea.com

mokraemer
Senior Member
Beiträge: 2366
Registriert: So 8. Aug 2010, 01:23
Wohnort: Mainz

Re: Timezone (we_conf)

Beitragvon mokraemer » Di 7. Feb 2012, 20:32

how is

Code: Alles auswählen

date_default_timezone_get()
evaluted on your server? This statement tries to set the default time-zone, and only if this fails, it is initialized by another default value that prevents from major errors.

In my opinion we have 2 options:
1. ignore system-default and set a user-defineable time-zone
2. leave this value to the system-operator (this value is set in php.ini)

At design, option 2 was chosen - but I think this is not what we want nowdays.
You can just remove the if-statement, and your code should work.
webEdition-Kern-Entwickler


Zurück zu „webEdition Basic Version“

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast