Ticket #600 (assigned enhancement)

Opened 3 months ago

Last modified 2 months ago

Timezone in jelix config file

Reported by: doubleface Assigned to: doubleface (accepted)
Priority: low Milestone: jelix 1.1
Component: jelix:core Version: trunk
Severity: minor Keywords:
Cc: Php version:
Review: review+ Hosting Provider:
Documentation needed: 0 Blocking:

Description

Would it be possible to let PHP "guess" the timezone if no timezone is specified in jelix config file? I actually need it for my project and for the moment, I have to patch Jelix for every update(I know exactly on which machine and which os the application will be deployed). I don't think it would be a problem since the timezone is defined in defaultconfig.ini.php.

See the small patch, which was made on the "dev" version (no access to the svn repository from work).

Attachments

timezone.patch (0.5 kB) - added by doubleface on 05/22/08 17:27:33.
patch on jCoordinator
timezone.2.patch (0.5 kB) - added by doubleface on 05/22/08 17:30:31.
timezone.jConfigCompiler.patch (1.0 kB) - added by doubleface on 05/27/08 10:30:18.
Same modification, but in jConfigCompiler

Change History

05/22/08 17:27:33 changed by doubleface

  • attachment timezone.patch added.

patch on jCoordinator

05/22/08 17:30:31 changed by doubleface

  • attachment timezone.2.patch added.

05/27/08 00:43:47 changed by laurentj

  • review changed from review? to review-.

The patch should be made on jConfigCompiler instead, so date_default_timezone_get() will be called only one time.

05/27/08 10:29:38 changed by doubleface

  • status changed from new to assigned.
  • review changed from review- to review?.

That is a good idea.

Here is the patch, but made from the repository this time (retrieved the file from trac).

I tested it only without the jelix extension.

05/27/08 10:30:18 changed by doubleface

  • attachment timezone.jConfigCompiler.patch added.

Same modification, but in jConfigCompiler

05/27/08 10:36:14 changed by doubleface

I forgot to add that, this time, the date_default_timezone_get is made if the timeZone key exists in config file, but is empty. This is more flexible. With the previous patch, you couldn't erase a key if it was valued in defaultconfig.ini and the you had to modify it, too.

I think, this timeZone should be empty in defaultconfig.ini instead of Europe/Paris (to be more international ;-) ).

05/28/08 11:23:35 changed by laurentj

  • review changed from review? to review+.

The patch is ok

this timeZone should be empty in defaultconfig.ini instead of Europe/Paris (to be more international

ok I agree, so erase the value of timeZone in lib/jelix/core/defaultconfig.ini.php and in lib/jelix-scripts/templates/var/config/defaultconfig.ini.php.tpl

07/02/08 10:33:02 changed by bballizlife

So here we can commit the patch, just adding to it the fact of emptying the timeZone values in lib/jelix/core/defaultconfig.ini.php and in lib/jelix-scripts/templates/var/config/defaultconfig.ini.php.tpl ?

07/02/08 11:22:37 changed by doubleface

Yes, I forgot to qdd it in the patch. Can someone commit the patch for me? I still don't have internet at home and no possiblity to commit from work (proxy à la con).

Replying to bballizlife:

So here we can commit the patch, just adding to it the fact of emptying the timeZone values in lib/jelix/core/defaultconfig.ini.php and in lib/jelix-scripts/templates/var/config/defaultconfig.ini.php.tpl ?

Download in other formats: Comma-delimited Text Tab-delimited Text RSS Feed