aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Yu <tlyu@mit.edu>2012-12-21 16:07:28 -0500
committerTom Yu <tlyu@mit.edu>2012-12-22 12:40:16 -0500
commitd26e137cac97399645f41b19270d565f5bd8192c (patch)
tree2157d9cc24b370312c3768eae5b8632f68560061 /src
parente8e34ead59b3e1fd28beb151c5e6efb47bc57bee (diff)
downloadkrb5-d26e137cac97399645f41b19270d565f5bd8192c.zip
krb5-d26e137cac97399645f41b19270d565f5bd8192c.tar.gz
krb5-d26e137cac97399645f41b19270d565f5bd8192c.tar.bz2
Delete timestamp_to_sfstring sprintf fallback
The final fallback for krb5_timestamp_to_sfstring() is an explicit European date-order format string passed to sprintf(). This can be confused with a conventional US date format. Because we attempt to build a strftime() replacement anyway, and we try passing some unambiguous ISO 8601 date and time formats to strftime(), remove this final fallback. ticket: 7518 (new)
Diffstat (limited to 'src')
-rw-r--r--src/lib/krb5/krb/str_conv.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/lib/krb5/krb/str_conv.c b/src/lib/krb5/krb/str_conv.c
index 1ffd026..e070c91 100644
--- a/src/lib/krb5/krb/str_conv.c
+++ b/src/lib/krb5/krb/str_conv.c
@@ -259,15 +259,6 @@ krb5_timestamp_to_sfstring(krb5_timestamp timestamp, char *buffer, size_t buflen
if ((ndone = strftime(buffer, buflen, sftime_format_table[i], tmp)))
break;
}
- if (!ndone) {
-#define sftime_default_len 2+1+2+1+4+1+2+1+2+1
- if (buflen >= sftime_default_len) {
- snprintf(buffer, buflen, "%02d/%02d/%4d %02d:%02d",
- tmp->tm_mday, tmp->tm_mon+1, 1900+tmp->tm_year,
- tmp->tm_hour, tmp->tm_min);
- ndone = strlen(buffer);
- }
- }
if (ndone && pad) {
for (i=ndone; i<buflen-1; i++)
buffer[i] = *pad;