#2896 NORM Untriag: sugar.date API review

Zarro Boogs per Child bugtracker at laptop.org
Mon Aug 20 11:38:44 EDT 2007


#2896: sugar.date API review
-------------------------------+--------------------------------------------
  Reporter:  marco             |       Owner:  marco     
      Type:  defect            |      Status:  new       
  Priority:  normal            |   Milestone:  Untriaged 
 Component:  interface-design  |     Version:            
Resolution:                    |    Keywords:  api-review
  Verified:  0                 |  
-------------------------------+--------------------------------------------
Changes (by Eben):

  * owner:  Eben => marco

Comment:

 > The key word being "display". Up until the moment of display, use UTC.
 > It's almost never good to do anything else (computation, storage, etc.)
 > with non-UTC time.

 This is ''exactly'' right.  The relative date API should be used solely
 for display purposes and any such date objects should live in RAM and
 never be serialized into a file.  There's no reason to (and many reasons
 not to) replace the underlying UTC time stamps.

 I suppose you could augment it easily by allowing authors to store time
 zone metadata in files (you'd have to standardize that, of course, eg.
 timezone:EST etc).  Then, assuming such metadata exists you could offer an
 optional time zone argument in the constructor for the relative date
 object which takes it into account.

-- 
Ticket URL: <https://dev.laptop.org/ticket/2896#comment:5>
One Laptop Per Child <http://laptop.org/>



More information about the Bugs mailing list