How to overwrite the core file to remove the timezone from the print to pdf file, How can we do this through the customization?

How to overwrite the core file to remove the timezone from the print to pdf file, How can we do this through the customization?

Path: sugar\modules\Reports\sugarpdf\sugarpdf.reports.php

Code :  $this->SetHeaderData(PDF_SMALL_HEADER_LOGO, PDF_SMALL_HEADER_LOGO_WIDTH, $this->bean->name, $timedate->getNow(true)"));

$timedate->getNow(true) instead of this we need to replace "date("D M j G:i:s")

Parents
  • Hi

    May be you need to change your PHP ini file, in the timezone config section.
    You can overwrite the config file, there is a config file inside SugarCRM core and it is editable (config_override.php) this if your site is an OnSite version.
    Or you can check your OS timezone configuration.
    The function getNow() I think gives you the current and the system time and there are many ways of format that date.
    If you want hide the printed date in the pdf file or modify the config, I hope this be useful for you:
    support.sugarcrm.com/.../

    Regards.

  • We are looking to overwrite the file sugar\modules\Reports\sugarpdf\sugarpdf.reports.php via custom directory , but unfortunately it's not working for us.

Reply Children
  • Unfortunately it is not possible to override such file, once this very class is extended by all PDF Report classes.

    But you can extend the sub classes in order to override the method preDisplay, where you are able to redefine setHeaderData accordingly.

    André Lopes
    Lampada Global
    Skype: andre.lampada