Menu

how to set the timezone to local ?

Help
2020-06-05
2020-06-08
  • Hans Melgers

    Hans Melgers - 2020-06-05

    Hi, this is probably a very easy question but how to set the timezone to local for hfax+ ? I tried the set Timezone: Local in hyla.conf, copy the timezone file to the etc dir, nothing works. What is the correct way to get rid of the standard gmt and use the local timezone ?

     
    • Lee Howard

      Lee Howard - 2020-06-05

      If you want to set the timezone on the tagline on the sent faxes to a timezone that is different from the server, then you can use the "sendfax -O timezone:TZ_LOCAL" option, or equivalent for your locale.

      If you want to set the timezone for the faxstat output, then you use the TimeZone parameter in hyla.conf or .hylarc. In looking at the code the "local" parameter appears to be case-sensitive. So, you shouldn't capitalize it as "Local". It looks like the only options there are GMT and "local".

      Also, for faxstat you can just use the "-l" option for local rather than configuring it.

       
  • Hans Melgers

    Hans Melgers - 2020-06-06

    Thanks Lee,
    I want to use the timezone on the faxstat output as i use that via a perl script for reporting (with a modified JobFmt and the Fax::Hylafax::Client library). I have TimeZone: local in hyla.conf but somehow this still does not work, reports show GMT time. Unfortunately the perl library does not have a parameter for "-l". Is there any other way to force this or am i better off with just adding some code to convert to the right TZ ?

     
    • Lee Howard

      Lee Howard - 2020-06-08

      I submitted a test fax in this manner:

      echo test | sendfax -a "20:00" -n -d 306
      

      Without any "timezone" entry in hyla.conf here is the output of 'faxstat -s':

      [root@myhost ~]# echo test | sendfax -a "20:00" -n -d 306
      request id is 911 (group id 911) for host localhost (1 file)
      [root@myhost ~]# faxstat -s
      HylaFAX scheduler on myhost: Running
      Modem ttyIAX0 (306): Running and idle
      Modem ttyIAX1 (306): Running and idle
      
      JID  Pri S  Owner Number       Pages Dials     TTS Status
      911  127 P   root 306           0:0   0:12   03:00 
      

      ... and here is the output of 'faxstat -sl':

      [root@myhost ~]# faxstat -sl
      HylaFAX scheduler on myhost: Running
      Modem ttyIAX0 (306): Running and idle
      Modem ttyIAX1 (306): Running and idle
      
      JID  Pri S  Owner Number       Pages Dials     TTS Status
      911  127 P   root 306           0:0   0:12   20:00 
      

      When I add "TimeZone: local" to hyla.conf here is the output of 'faxstat -s':

      [root@myhost ~]# faxstat -s
      HylaFAX scheduler on myhost: Running
      Modem ttyIAX0 (306): Running and idle
      Modem ttyIAX1 (306): Running and idle
      
      JID  Pri S  Owner Number       Pages Dials     TTS Status
      911  127 P   root 306           0:0   0:12   20:00 
      

      So, it seems to be working as it should be.

      Check to make sure that your hyla.conf is in the proper location and is readable by your perl process.

       

Log in to post a comment.