Date and time of faxes
Brought to you by:
squig
Hello,
We use Hylafax with Jhylafax in our company. The
software works well, but we have the question, the time
displayed systematically is two hours late against the
truth, what we get from /usr/sbin/faxinfo and also the
date of the files in Linux.
Hylafax servers runs under Fedora FC4, time zone is
CEST (Central Europe : Paris, Berlin, etc.)
Clients runs Jhylafax 1.3.9 (same problem with previous
version) with W2K and WXP.
No additional setting was made on Hylafax.
The displayed time works with other clients (yajhfc,
etc.)... Do you have any clue about this ?
Thank you in advance,
Logged In: YES
user_id=362264
I have the same problem but i am running two Hylafax Servers:
No 1. is old version of Hylafax running on a Slackware 7.2
machine and DOES NOT have a problem with time
No 2. is new installation with Hylafax ver 4.3 and does have
a problem
Both are set up with Rome (CEST/CET) timezone
Logged In: NO
The fix is quite easy:
in thew calss HylaFAXClientHelper there are two methods which calculate the time of the received and sent faxes, parseRcvFmt for the received faxes and parseJobFmt for the sent faxes. In the sent faxes parseJobFmt method there is the following code:
case 'Z': {
// should work, but for some reason calculates the
// wrong time, so 'Y' is used instead
Date date = new Date(Long.parseLong(s));
//job.setSendTime(date);
break; }
this is incorrect, because the java Date method expects the Date in milliseconds but the Hylafax server returns the date in seconds, so the fix looks like this:
case 'Z': {
// should work, but for some reason calculates the
// wrong time, so 'Y' is used instead
Date date = new Date(Long.parseLong(s*1000));
job.setSendTime(date);
break; }
The following code (corresponding to the code in the parseJobFmt methode) has to be entered in the parseRcvFmt method to calculate the receive date correctly if the hylafax server is running in local time:
switch (c) {
case 'Y':
Date date = new SimpleDateFormat("yyyy:MM:dd HH:mm:ss").parse(s);
//fax.setReceivedTime(date);
break;
case 'Z':
Date date1 = new Date(Long.parseLong(s)*1000);
fax.setReceivedTime(date1);
break;
the case 'Z' switch is missing.
The %Z therefore also has to be entered here:
public final static String RCVFMT = "__RCVFMT |%Y |%a |%b |%d |%e |%f |%h |%i |%j |%l |%n |%o |%p |%r |%s |%w |%z |%Z ";
Then it works!
Logged In: NO
We have the same problem: wrong time although it is corrected inform by faxinfo.
After a short investigation, I came to the conclusion that the client need to set its time zone any set the time manually.
i.e., set the timezone in the preferences and adjust it automatically when fetching the faxes.
Thank you.
Logged In: YES
user_id=2001724
Originator: NO
We have the same problem: wrong time although it is corrected informed by faxinfo.
After a short investigation, I came to the conclusion that the client need to set its time zone any set the time manually.
i.e., set the timezone in the preferences and adjust it automatically when fetching the faxes.
Thank you.