From chas@cmf.nrl.navy.mil Mon May 1 16:46:07 2000
Received: from MIT.EDU (SOUTH-STATION-ANNEX.MIT.EDU [18.72.1.2])
by rt-11.mit.edu (8.9.3/8.9.3) with SMTP id QAA26735
for <bugs@RT-11.MIT.EDU>; Mon, 1 May 2000 16:46:03 -0400 (EDT)
Received: from ginger.cmf.nrl.navy.mil by MIT.EDU with SMTP
id AA25282; Mon, 1 May 00 16:45:59 EDT
Received: from fermi.cmf.nrl.navy.mil (fermi.cmf.nrl.navy.mil [134.207.10.73])
by ginger.cmf.nrl.navy.mil (8.9.3/8.9.3) with ESMTP id QAA03385
for <krb5-bugs@mit.edu>; Mon, 1 May 2000 16:45:53 -0400 (EDT)
Received: (chas@localhost) by fermi.cmf.nrl.navy.mil (8.6.12/8.6.11) id QAA10699; Mon, 1 May 2000 16:45:49 -0400
Message-Id: <200005012045.QAA10699@fermi.cmf.nrl.navy.mil>
Date: Mon, 1 May 2000 16:45:49 -0400
From: Chas Williams <chas@cmf.nrl.navy.mil>
Reply-To: chas@cmf.nrl.navy.mil
To: krb5-bugs@MIT.EDU
Subject: bug in krb5/lib/str_conv.c::krb5_timestamp_to_[sf]string()
X-Send-Pr-Version: 3.99
code warrior pro 4
in krb5/lib/str_conv.c fails to correct for the macintosh epoch
which is about 70 years different from the unix epoch.
generally, unix timestamps needs to be 'offseted' before being
sent through the 'ansi' date routines on the macintosh
this problem probably also exists in the mit kerberos for the
macintosh release unless the custom libc used by the mit
programmers already corrects for this 'defect'
to a human readable format, so its difficult to reproduce unless you
have one of these applications.
something like this needs to be added fairly early to the
routines:
#ifdef macintosh
extern krb5_int32 getTimeZoneOffset();
timestamp += (((70 * 365) + 17) * 24 * 3600) + getTimeZoneOffset();
#endif /* macintosh */
Received: from MIT.EDU (SOUTH-STATION-ANNEX.MIT.EDU [18.72.1.2])
by rt-11.mit.edu (8.9.3/8.9.3) with SMTP id QAA26735
for <bugs@RT-11.MIT.EDU>; Mon, 1 May 2000 16:46:03 -0400 (EDT)
Received: from ginger.cmf.nrl.navy.mil by MIT.EDU with SMTP
id AA25282; Mon, 1 May 00 16:45:59 EDT
Received: from fermi.cmf.nrl.navy.mil (fermi.cmf.nrl.navy.mil [134.207.10.73])
by ginger.cmf.nrl.navy.mil (8.9.3/8.9.3) with ESMTP id QAA03385
for <krb5-bugs@mit.edu>; Mon, 1 May 2000 16:45:53 -0400 (EDT)
Received: (chas@localhost) by fermi.cmf.nrl.navy.mil (8.6.12/8.6.11) id QAA10699; Mon, 1 May 2000 16:45:49 -0400
Message-Id: <200005012045.QAA10699@fermi.cmf.nrl.navy.mil>
Date: Mon, 1 May 2000 16:45:49 -0400
From: Chas Williams <chas@cmf.nrl.navy.mil>
Reply-To: chas@cmf.nrl.navy.mil
To: krb5-bugs@MIT.EDU
Subject: bug in krb5/lib/str_conv.c::krb5_timestamp_to_[sf]string()
X-Send-Pr-Version: 3.99
Show quoted text
>Number: 851
>Category: krb5-libs
>Synopsis: krb5_timestamp_to_[sf]string() fails to correct for macintosh epoch
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: krb5-unassigned
>State: open
>Class: sw-bug
>Submitter-Id: unknown
>Arrival-Date: Mon May 1 16:47:00 EDT 2000
>Last-Modified:
>Originator: Chas Williams
>Organization:
Naval Research Laboratory, Washington, DC>Category: krb5-libs
>Synopsis: krb5_timestamp_to_[sf]string() fails to correct for macintosh epoch
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: krb5-unassigned
>State: open
>Class: sw-bug
>Submitter-Id: unknown
>Arrival-Date: Mon May 1 16:47:00 EDT 2000
>Last-Modified:
>Originator: Chas Williams
>Organization:
Show quoted text
>Release: 1.0pl1
>Environment:
power mac g4, macos 9.0>Environment:
code warrior pro 4
Show quoted text
>Description:
krb5_timestamp_to_string() and krb5_timestamp_to_sfstring()in krb5/lib/str_conv.c fails to correct for the macintosh epoch
which is about 70 years different from the unix epoch.
generally, unix timestamps needs to be 'offseted' before being
sent through the 'ansi' date routines on the macintosh
this problem probably also exists in the mit kerberos for the
macintosh release unless the custom libc used by the mit
programmers already corrects for this 'defect'
Show quoted text
>How-To-Repeat:
very few applications on the macintosh actually convert timestampsto a human readable format, so its difficult to reproduce unless you
have one of these applications.
Show quoted text
>Fix:
something like this needs to be added fairly early to the
routines:
#ifdef macintosh
extern krb5_int32 getTimeZoneOffset();
timestamp += (((70 * 365) + 17) * 24 * 3600) + getTimeZoneOffset();
#endif /* macintosh */
Show quoted text
>Audit-Trail:
>Unformatted:
>Unformatted: