diff options
author | "Nagaraj Yedathore - Sun Microsystems - Bangalore India" <Nagaraj.Yedathore@Sun.COM> | 2010-04-22 23:22:48 -0700 |
---|---|---|
committer | "Nagaraj Yedathore - Sun Microsystems - Bangalore India" <Nagaraj.Yedathore@Sun.COM> | 2010-04-22 23:22:48 -0700 |
commit | a1aee5ee83c7eccdd49b3ec08834f511c11408c3 (patch) | |
tree | 9bc700cca2bbc52eaffa52b8ecd0b16a294bc255 /usr/src/cmd/svr4pkg/pkginstall/main.c | |
parent | 80dc702d1ace8fb9dbee9d449a58b943b7308a8e (diff) | |
download | illumos-joyent-a1aee5ee83c7eccdd49b3ec08834f511c11408c3.tar.gz |
6938857 INSTDATE in pkginfo has an encoding issue when installed on a japanese lcoale in Nevada
Diffstat (limited to 'usr/src/cmd/svr4pkg/pkginstall/main.c')
-rw-r--r-- | usr/src/cmd/svr4pkg/pkginstall/main.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/usr/src/cmd/svr4pkg/pkginstall/main.c b/usr/src/cmd/svr4pkg/pkginstall/main.c index 6bc5207b2e..5dbad3f62b 100644 --- a/usr/src/cmd/svr4pkg/pkginstall/main.c +++ b/usr/src/cmd/svr4pkg/pkginstall/main.c @@ -20,8 +20,7 @@ */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ @@ -269,6 +268,7 @@ main(int argc, char *argv[]) char param[MAX_PKG_PARAM_LENGTH]; char script[PATH_MAX]; char altscript[PATH_MAX]; + char *temp; int c; int disableAttributes = 0; int err; @@ -2039,9 +2039,19 @@ main(int argc, char *argv[]) } (void) time(&clock); + + /* + * We do not want the time in locale in the pkginfo. + * save the LC_TIME and set it to C. Reset it with saved one + * after cftime(). + */ + temp = setlocale(LC_TIME, NULL); + (void) setlocale(LC_TIME, "C"); + /* LINTED warning: do not use cftime(); ... */ (void) cftime(cbuf, "%b %d \045Y \045H:\045M", &clock); putparam("INSTDATE", qstrdup(cbuf)); + (void) setlocale(LC_TIME, temp); /* * Store information about package being installed; |