Ticket #371 (closed enhancement: fixed)

Opened 11 years ago

Last modified 7 years ago

daf::base::DateTime shouldn't hardcode leap-second table

Reported by: smm Owned by: smm
Priority: trivial Milestone:
Component: daf_base Keywords:
Cc: smm Blocked By:
Blocking: Project: LSST
Version Number:
How to repeat:

not applicable

Description

daf::base::DateTime? contains a hard-coded leap second table for TAI<->UTC conversion. It would be better if this table could be specified or overriden at runtime via a Policy.

The default table should be provided via an appropriate policy dictionary.

Change History

comment:1 Changed 11 years ago by ktl

  • Status changed from new to assigned

comment:2 Changed 11 years ago by ktl

  • Status changed from assigned to inTicketWork

Making DateTime depend on Policy will likely mean moving it to a different package, since pex::policy depends on daf::base. This is unfortunate, although usage is likely restricted to daf::persistence.

comment:3 Changed 11 years ago by ktl

  • Status changed from inTicketWork to inStandardsReview
  • Owner changed from ktl to smm

Fixed by [6107] and [6108], which also fix an undiscovered off-by-one bug for times between the last two in the leap second table and adds the 1 Jan 2009 leap second to the compiled-in table. The interface for setting the leap second table uses a std::vector<std::pair<int, int> > const& in order to avoid dependencies on Policy. It's not clear how this interface should be SWIGged, however, which is also holding up adding a test case to tests/DateTime.py.

comment:4 Changed 10 years ago by smm

  • reviewstatus changed from notReady to reviewed

This is the simplest and most non-intrusive way of making the leap second table configurable at run-time. The SWIG interface and additional test case can be addressed at a later date (and a separate ticket).

comment:5 Changed 10 years ago by robyn

  • Owner changed from smm to robyn
  • Status changed from inStandardsReview to inTrunkMerge

I'm moving this Ticket to closure since the comments indicate the issue is solved by other Tickets.

comment:6 Changed 10 years ago by robyn

  • Status changed from inTrunkMerge to inQaReview

comment:7 Changed 10 years ago by robyn

  • Status changed from inQaReview to closed
  • Resolution set to fixed

comment:8 Changed 10 years ago by robyn

  • Owner changed from robyn to smm

comment:9 Changed 7 years ago by robyn

  • Milestone DC3 Infrastructure Prep deleted

Milestone DC3 Infrastructure Prep deleted

Note: See TracTickets for help on using tickets.