Hiya! I was wondering if you could give a rundown on the current state of timezone support in Vpim. I realize it is a big hairy mess to deal with, but I''m expecting to have to fight it to a standstill. I''ve figured out what I needed to know from TZInfo to be able to help out. At minimum, can I suggest that the following method (in rfc2425.rb) be patched? module Vpim # Encode a Time or DateTime object as "yyyymmddThhmmssZ" def Vpim.encode_date_time(d) # :nodoc: "%0.4d%0.2d%0.2dT%0.2d%0.2d%0.2d#{d.utc? ? "Z", ""}" % [ d.year, d.mon, d.day, d.hour, d.min, d.sec ] end end This allows everything to be coerced down into UTC, which may be the best workable solution. Thanks again for the wonderful work, sanjay -- The world tends to work out for me. I try to give it reason to.
On Thu, Jun 15, 2006 at 12:07:43PM -0400, Sanjay Vakil wrote:> Hiya! I was wondering if you could give a rundown on the current > state of timezone support in Vpim. I realize it is a big hairy mess > to deal with, but I''m expecting to have to fight it to a standstill.Doesn''t really support timezones. Uses basic C library support (i.e., UTC and local, nothing else).> I''ve figured out what I needed to know from TZInfo to be able to help out. > > At minimum, can I suggest that the following method (in rfc2425.rb) be patched? > > module Vpim # Encode a Time or DateTime object as "yyyymmddThhmmssZ" > def Vpim.encode_date_time(d) # :nodoc: > "%0.4d%0.2d%0.2dT%0.2d%0.2d%0.2d#{d.utc? ? "Z", ""}" % [ d.year, > d.mon, d.day, d.hour, d.min, d.sec ] > end > end > > This allows everything to be coerced down into UTC, which may be the > best workable solution.Seems reasonable, I''ll try it. Sam
On Thu, Jun 15, 2006 at 11:34:08AM -0700, Sam Roberts wrote:> On Thu, Jun 15, 2006 at 12:07:43PM -0400, Sanjay Vakil wrote: > > Hiya! I was wondering if you could give a rundown on the current > > state of timezone support in Vpim. I realize it is a big hairy mess > > to deal with, but I''m expecting to have to fight it to a standstill. > > Doesn''t really support timezones. Uses basic C library support (i.e., > UTC and local, nothing else).Oh, and btw, the largest problem is actually just having a library that can do TZ manipulations. Such a library exists now on rubyforge, luckily, so "only" the Icalendar side needs to be implemented. I''m happy to work with you if you implement TZ support. Sam