Jump to content

Recommended Posts

  • Administrators
Posted

Can you guys make a quick PHP script with this in it, and paste the output here.

<?php
echo(date_default_timezone_get());

I wonder how many hosts have properly set it up. It seems like I'm running into issues where the time is not being in the right timezone with some data I'm getting back to vaCentral. So I'll have to manually fix this... but I'm wondering if any hosts have this set properly in the first place. I'll manually do it...and I guess GMT is the aviation standard?

  • Moderators
Posted

How strange, this is what i get.

System/Localtime

My server is set to GMT because i set it, but there is no output above, i think i have locked quite a bit down via apache config and the php.ini...

  • Moderators
Posted

I know as a quick fix in your website root dir you can create a file called php.ini and in that you can just define what location you wish to set the timezome for that directory.

That way you can define different timezones to different websites if you so wish.

Done forget to restart apache or iis to make the change.

  • Administrators
Posted

I know as a quick fix in your website root dir you can create a file called php.ini and in that you can just define what location you wish to set the timezome for that directory.

That way you can define different timezones to different websites if you so wish.

Done forget to restart apache or iis to make the change.

That works on only a few servers. The actual issue is MySQL which I'm now finding out.

Guest Brian
Posted

Well no matter what the timezone is, if you need to change it, their is a simple php code you insert into the main php file of your site. Let me know if you need it.

  • Administrators
Posted

Well no matter what the timezone is, if you need to change it, their is a simple php code you insert into the main php file of your site. Let me know if you need it.

Not really, it's not that simple. It depends on safe-mode settings, and if the host allows changes. MySQL settings are also completely different and depend on whether they are set to the SYSTEM, or set to their own individually. Then there are different permission sets for changing the timezone, and whether it's set for the system, or if it has to be set per-session, which could also depend on the settings. Same with PHP.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...