diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-02-09 10:56:24 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-02-09 10:56:24 +0000 |
commit | b814252d728cb08f159da1777feca4f8e9362327 (patch) | |
tree | de6617897dbf6bce78045e3fa2ea84ea2422f166 /time.c | |
parent | 1bbcd202e4dab0894bc5ed68ce4ea84dc916980f (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.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 |