From: Alan G. <ago...@ya...> - 2003-09-19 22:58:00
|
--- Alan Gonzalez <ago...@ya...> wrote: > Ok, I've switched briefly to the calendar. the vx10 only holds date time and > description. > > > I've decoded the date/time but since it's based off the Jan 1, 1980, I am not > getting the dates displayed. The numbers i have for y,m,d,h,m seem right. > yet they are small since they are based off the epoch. how do i convert them > to display correctly in the calendar? > Well I did this: date = readlsb(data[pos+3:pos+7]) date+=self._brewepochtounix entry['start']=brewdecodedate(date) then changed brewdecodedate to do this: newdate = time.localtime(val) year=newdate[0] month=newdate[1] day=newdate[2] hour=newdate[3] min=newdate[4] return (year, month, day, hour, min) my epoch conversion is different too, only 16hrs # plus a fudge factor of 4 days, 16 hours for no reason I can find _brewepochtounix=315532800+403200 So now i have entries showing up in the calendar :) i'll update to cvs now. __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com |