Welcome Guest, Not a member yet? Register   Sign In
time reference change (local to UP1)
#1

[eluser]ok3x[/eluser]
Hi, I have an app hosted on american server (east coast), but all users ale located in central Europe. Is there an easy way to set the time reference to UP1 (UTC + 1:00) so that all php functions such as date(), time() etc. provide "wanted" results? I won't have access to the server's php configuration, that's why it has to be set within CI.

I searched the forums, but it didn't help. Thx for reply Smile
#2

[eluser]ok3x[/eluser]
Actually, i did some aftersearch and found a solution. All I need to do is include following line.
Code:
putenv('TZ=Europe/Berlin');

List of supported timezones can be found here
#3

[eluser]Computerzworld[/eluser]
You can put this function in config.php & it will be applicable to all the files..

Code:
date_default_timezone_set('Europe/Berlin');
#4

[eluser]ok3x[/eluser]
Thanks for reply. I believe both solutions lead to the same result.




Theme © iAndrew 2016 - Forum software by © MyBB