summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-02-09 10:56:24 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-02-09 10:56:24 +0000
commitb814252d728cb08f159da1777feca4f8e9362327 (patch)
treede6617897dbf6bce78045e3fa2ea84ea2422f166 /time.c
parent1bbcd202e4dab0894bc5ed68ce4ea84dc916980f (diff)
1.1b7 pre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@67 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r--time.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/time.c b/time.c
index c16a11641f..4bbe4fbd4f 100644
--- a/time.c
+++ b/time.c
@@ -414,16 +414,16 @@ time_asctime(time)
VALUE time;
{
struct time_object *tobj;
- char buf[64];
- int len;
+ char *s;
GetTimeval(time, tobj);
if (tobj->tm_got == 0) {
time_localtime(time);
}
- len = strftime(buf, 64, "%c", &(tobj->tm));
+ s = asctime(&(tobj->tm));
+ if (s[24] == '\n') s[24] = '\0';
- return str_new(buf, len);
+ return str_new2(s);
}
static VALUE