From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020615 Debian/1.0.0-3 Description of problem: The lease time from 'pump -i eth0 --status' is being reported as UTC time, and perhaps incorrectly. I am UTC+5, which explains the time difference below, but the date should be one day later if that is the case. I checked out a new lease immediately before checking the status below: (details omitted here...) Renewal time: Wed Aug 14 08:45:53 2002 Expiration time: Wed Aug 14 09:45:53 2002 my_machine:/etc/network# date Wed Aug 14 01:46:05 EST 2002 It would seem preferable to report the lease using the user's local time. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1.pump -i eth0 2.pump -i eth0 --status 3.date Actual Results: Already provided in the above description. Expected Results: Should have used my local time. Additional info:
A trivial fix. Seems reasonable.
already fixed in cvs: static const char *const fmt = "%c"; /* stupid Y2K paranoid compiler */ upnow = pumpUptime(); tzset(); now = time(NULL); localAt = now + (i.renewAt - upnow); localExpiration = now + (i.leaseExpiration - upnow); strftime(s, sizeof(s), fmt, localtime(&localAt)); printf(_("\tRenewal time: %s\n"), s); strftime(s, sizeof(s), fmt, localtime(&localExpiration)); printf(_("\tExpiration time: %s\n"), s);