~ubuntu-branches/debian/squeeze/ntp/squeeze

« back to all changes in this revision

Viewing changes to libntp/prettydate.c

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2010-05-24 11:09:51 UTC
  • mfrom: (1.2.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20100524110951-1o7gh469ygochf4n
Tags: 1:4.2.6.p1+dfsg-1
* New upstream version
  - They no longer ship arlib, adjust dfsg.patch.
  - Drop kfreebsd.patch, applied upstream
  - Update patches for upstream changes.
* Remove the obsolete config files:

  for ntp:
  - /etc/logcheck/ignore.d.server/ntp, removed in 1:4.2.6+dfsg-1
  - /etc/dhcp3/dhclient-enter-hooks.d/ntp, replaced by exit hooks in
    1:4.2.4p4+dfsg-3
  - /etc/network/if-up.d/ntp, removed in 1:4.2.4p0+dfsg-1

  for ntpdate:
  - /etc/dhcp3/dhclient-enter-hooks.d/ntpdate, replaced by exit hooks in
    1:4.2.4p4+dfsg-3

  Use dpkg 1.15.7.2's dpkg-maintscript-helper.  This needs
  a Pre-Depends to work, else it's never going to be removed.
  (Closes: #569530)
* Add "Depends: ${misc:Depends}" to ntp-doc.

Show diffs side-by-side

added added

removed removed

Lines of Context:
170
170
        msec = ts->l_uf / 4294967;      /* fract / (2 ** 32 / 1000) */
171
171
 
172
172
        tm = ntp2unix_tm(sec, local);
173
 
        if (!tm) {
174
 
                (void) sprintf(bp, "%08lx.%08lx  --- --- -- ---- --:--:--",
175
 
                       (u_long)ts->l_ui, (u_long)ts->l_uf);
176
 
        }
177
 
        else {
178
 
                (void) sprintf(bp, "%08lx.%08lx  %s, %s %2d %4d %2d:%02d:%02d.%03lu",
179
 
                       (u_long)ts->l_ui, (u_long)ts->l_uf, days[tm->tm_wday],
180
 
                       months[tm->tm_mon], tm->tm_mday, 1900 + tm->tm_year,
181
 
                       tm->tm_hour,tm->tm_min, tm->tm_sec, msec);
182
 
        }
 
173
        if (!tm)
 
174
                snprintf(bp, LIB_BUFLENGTH,
 
175
                         "%08lx.%08lx  --- --- -- ---- --:--:--",
 
176
                         (u_long)ts->l_ui, (u_long)ts->l_uf);
 
177
        else
 
178
                snprintf(bp, LIB_BUFLENGTH,
 
179
                         "%08lx.%08lx  %s, %s %2d %4d %2d:%02d:%02d.%03lu",
 
180
                         (u_long)ts->l_ui, (u_long)ts->l_uf,
 
181
                         days[tm->tm_wday], months[tm->tm_mon],
 
182
                         tm->tm_mday, 1900 + tm->tm_year, tm->tm_hour,
 
183
                         tm->tm_min, tm->tm_sec, msec);
183
184
        
184
185
        return bp;
185
186
}