aboutsummaryrefslogtreecommitdiff
path: root/src/lib/krb5/asn.1/asn1_encode.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/krb5/asn.1/asn1_encode.c')
-rw-r--r--src/lib/krb5/asn.1/asn1_encode.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/lib/krb5/asn.1/asn1_encode.c b/src/lib/krb5/asn.1/asn1_encode.c
index 7ef89c8..7cc8042 100644
--- a/src/lib/krb5/asn.1/asn1_encode.c
+++ b/src/lib/krb5/asn.1/asn1_encode.c
@@ -186,12 +186,6 @@ asn1_error_code asn1_encode_ia5string(buf, len, val, retlen)
return 0;
}
-#ifdef macintosh
-#define EPOCH ((70 * 365 * 24 * 60 * 60) + (17 * 24 * 60 * 60) + (getTimeZoneOffset() * 60 * 60))
-#else
-#define EPOCH (0)
-#endif
-
asn1_error_code asn1_encode_generaltime(buf, val, retlen)
asn1buf * buf;
const time_t val;
@@ -201,9 +195,11 @@ asn1_error_code asn1_encode_generaltime(buf, val, retlen)
struct tm *gtime;
char s[16];
int length, sum=0;
- time_t gmt_time;
+ time_t gmt_time = val;
- gmt_time = val + EPOCH;
+#ifdef macintosh
+ unix_time_to_msl_time (&gmt_time);
+#endif
gtime = gmtime(&gmt_time);
/*