Skip Menu |

Download (untitled) / with headers
text/plain 2.3KiB
From Mon May 1 16:46:07 2000
by (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 by MIT.EDU with SMTP
id AA25282; Mon, 1 May 00 16:45:59 EDT
Received: from ( [])
by (8.9.3/8.9.3) with ESMTP id QAA03385
for <>; Mon, 1 May 2000 16:45:53 -0400 (EDT)
Received: (chas@localhost) by (8.6.12/8.6.11) id QAA10699; Mon, 1 May 2000 16:45:49 -0400
Message-Id: <>
Date: Mon, 1 May 2000 16:45:49 -0400
From: Chas Williams <>
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
>Originator: Chas Williams
Naval Research Laboratory, Washington, DC
Show quoted text
>Release: 1.0pl1
power mac g4, macos 9.0
code warrior pro 4

Show quoted text
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
very few applications on the macintosh actually convert timestamps
to a human readable format, so its difficult to reproduce unless you
have one of these applications.

Show quoted text

something like this needs to be added fairly early to the

#ifdef macintosh
extern krb5_int32 getTimeZoneOffset();

timestamp += (((70 * 365) + 17) * 24 * 3600) + getTimeZoneOffset();
#endif /* macintosh */

Show quoted text
We no longer support older Mac OS.