From: Takaaki Tateishi Date: 2005-03-18T18:50:13+09:00 Subject: Re: Ruby/DL and libc's localtime Eric Hodel wrote: > def self.c_localtime(clock) > tm = LIBC.localtime(clock) > return tm.to_a('IIIIIIIIILc') # should match StructTm above > end Please use StructTm to create a proxy as follows. return LIBC::StructTm.new(tm) Now you can access each member as follows. p [tm.tm_sec, tm.tm_min, tm.tm_hour, tm.tm_mday, tm.tm_mon, tm.tm_year, tm.tm_wday, tm.tm_yday, tm.tm_isdst, tm.tm_gmtoff, tm.tm_zone] -- Takaaki Tateishi