summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-04-09 18:04:08 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-04-09 18:04:08 +0000
commit32e799db485107ba9d47fb4fb4cd44c9d6f57b8a (patch)
treee33fd45f76d7f31959c1e5298902588de716657c /time.c
parent35247a52ef719584a59ae9c518523f0ee825c8e3 (diff)
*** empty log message ***
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r--time.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/time.c b/time.c
index 8cdeb55..c8658d9 100644
--- a/time.c
+++ b/time.c
@@ -147,9 +147,18 @@ time_s_at(klass, time)
VALUE klass, time;
{
struct timeval tv;
+ VALUE t;
tv = rb_time_timeval(time);
- return time_new_internal(klass, tv.tv_sec, tv.tv_usec);
+ t = time_new_internal(klass, tv.tv_sec, tv.tv_usec);
+ if (TYPE(time) == T_DATA) {
+ struct time_object *tobj, *tobj2;
+
+ GetTimeval(time, tobj);
+ GetTimeval(t, tobj2);
+ tobj2->gmt = tobj->gmt;
+ }
+ return t;
}
static char *months [12] = {