Multiple TimeZone per Site/User chrooted

Discussion in 'Installation/Configuration' started by josej, Mar 31, 2008.

  1. josej

    josej New Member

    Hello,

    I'm jose from Spain, in advance, sorry my english is very bad,

    I have ISPConfig installed in two servers with Linux HA and DRBD

    One of the sites is an E-Commerce site in EEUU ( .us ) and another E-Commerce site is in Spain ( .es ).

    My question is about TimeZones

    I want differents TimeZones per Site, I have read somthing about this, and i think that its possible for differents users, modifying /home/someuser/.bashrc in chrooted enviroment by setting the TZ variable.

    With ISPConfig and his users its possible to do somthing similar?

    If not is possible, what can I do?


    sorry but my english is too bad :(

    Thanks
     
  2. josej

    josej New Member

    I have one solution

    My solution simple.

    On the init script (config for E-Commerce in USA or Spain or France etc..) in the E-Commerce Site I add the line:

    $GLOBALS["time_zone_site"]= "America/Los_Angeles";
    putenv('TZ=America/Los_Angeles');


    And in the interface to Adodb,in the "connect function"


    function connectFunction{
    {
    $this->db = new ADOnewConnection('mysqli');
    ...
    ...
    $this->db->Execute("SET time_zone = '".$GLOBALS["time_zone_site"]."'");
    }


    Thats all...
    Thanks
     

Share This Page