aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2001-03-21 15:39:17 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2001-03-21 15:39:17 +0000
commit1f30a4236c7b4ee4ad75100269361a74b3feb154 (patch)
tree524f309dbc8a536de0f06dc49f69e2ff84ee7ab7 /usr.bin
parent8234eb25191ff2e98c79946f745461a219a9a4dc (diff)
Notes
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/calendar/day.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/calendar/day.c b/usr.bin/calendar/day.c
index cf619b607c22..490a2bdb798d 100644
--- a/usr.bin/calendar/day.c
+++ b/usr.bin/calendar/day.c
@@ -140,6 +140,8 @@ void
settime(now)
time_t now;
{
+ char *oldl;
+
tp = localtime(&now);
if ( isleap(tp->tm_year + 1900) ) {
yrdays = 366;
@@ -152,9 +154,10 @@ settime(now)
offset = tp->tm_wday == 5 ? 3 : 1;
header[5].iov_base = dayname;
+ oldl = setlocale(LC_TIME, NULL);
(void) setlocale(LC_TIME, "C");
header[5].iov_len = strftime(dayname, sizeof(dayname), "%A", tp);
- (void) setlocale(LC_TIME, "");
+ (void) setlocale(LC_TIME, oldl);
setnnames();
}