created_at value in client_add function for remoting client.

Discussion in 'Developers' Forum' started by laptop_user, Mar 1, 2015.

  1. laptop_user

    laptop_user Member

    In client_add feature for remote framework, there is an option to insert data for created_at parameter. I check the client.tform.php file and it use conf_format_dateshort which is using Y-m-d format in en.lng file.

    Unfortunately using
    'created_at' => date('Y-m-d')
    does not work. Hard coding such as this
    'created_at' => 2015-02-28
    also have no effect. The date failed to be inserted in added_date column in client table.

    Does remoting client support adding date for created_at parameter? Please help and thanks in advance.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    It should be possible, but I havent tested it yet. If you cant get it to work, then please make a bugreport and we will check it for the next release.
  3. florian030

    florian030 Well-Known Member HowtoForge Supporter

    created_at is a timestamp. 'created_at' => time() should work.
  4. laptop_user

    laptop_user Member

    'created_at' => time()
    does not worked. I checked the type in the client table structure; it's not TIMESTAMP but DATE. Any suggestion..?
  5. florian030

    florian030 Well-Known Member HowtoForge Supporter

    Really? i just checked the structure and it´s varchar(255) DEFAULT NULL
  6. laptop_user

    laptop_user Member

    Sorry for wasting anyone time. There is another column name called added_date in the client table and I'm trying to use that field with created_at data. Of course it won't work. Adding another parameter like these solved the problem.
    'added_date' => date('Y-m-d')
    I confuse actually because added_date field is not in the remoting client script. Thanks for everyone input.
    Last edited: Mar 2, 2015

Share This Page