• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
timezone help

#14
[eluser]@robertotra[/eluser]
[quote author="InsiteFX" date="1329167163"]Then maybe you should read the post better![/quote]

I was focusing on your telling that if you do not set manually the default timezone of the server then sessions and cookies will not work properly and I do not understand why. Probably my limit, that's why I was asking.

What I understand of the time management in CI is that if you do use PHP native sessions and cookie or date/time functions then the default timezone set by the server itself will be used, while if you use CI session and cookie or date/time helper the config setting of CI should be used instead.

If your server is in America/New York, that will be already the default timezone set, why should you confirm it again manually? It creates also a portability issue: if you do change hosting and go to California you have to remember and change manually again the default timezone, isn't it?

Thanks
Roberto

EDIT on March 2012: The answer to my question is in the new version of PHP 5.4. When running phpinfo() without setting the timezone, the following warning appears:

Quote:Warning: phpinfo(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /your/path/to/phpinfo.php on line 3

So, PHP push to standardize the date/time management avoiding each server will set its own according to the local time.


Messages In This Thread
timezone help - by El Forum - 02-06-2012, 04:14 PM
timezone help - by El Forum - 02-06-2012, 05:04 PM
timezone help - by El Forum - 02-06-2012, 05:08 PM
timezone help - by El Forum - 02-06-2012, 06:45 PM
timezone help - by El Forum - 02-06-2012, 07:13 PM
timezone help - by El Forum - 02-06-2012, 08:15 PM
timezone help - by El Forum - 02-06-2012, 08:24 PM
timezone help - by El Forum - 02-06-2012, 10:01 PM
timezone help - by El Forum - 02-07-2012, 10:18 AM
timezone help - by El Forum - 02-07-2012, 10:29 AM
timezone help - by El Forum - 02-07-2012, 10:34 AM
timezone help - by El Forum - 02-13-2012, 10:29 AM
timezone help - by El Forum - 02-13-2012, 02:06 PM
timezone help - by El Forum - 02-13-2012, 03:02 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.