Edgewall Software

Changes between Version 8 and Version 9 of TracDev/ApiChanges/0.11


Ignore:
Timestamp:
Oct 15, 2006, 9:38:00 PM (18 years ago)
Author:
Christian Boos
Comment:

Initial documentation for the features brought by the merge of the datetime branch

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/ApiChanges/0.11

    v8 v9  
    260260 - Implementing [source:sandbox/genshi/trac/ticket/query.py@3725#L740 Ticket Query] macro (''table'' mode)
    261261 - Sending [source:sandbox/genshi/trac/notification.py@3725#L99 notification] e-mails
     262
     263== Date and Time Manipulations ==
     264
     265Since r3935, Trac uses `datetime` objects internally, instead of timestamps.
     266More precisely, the database layer still uses `int` timestamps, but manipulation of time values is now done on `datetime` objects as soon as possible, see e.g. the [source:trunk/trac/Timeline.py Timeline] module.
     267
     268Those `datetime` values are directly added by the controllers to the data model, and it's the responsibility of the ''templates'' to pick up the appropriate time representation, using one of the built-in date formatting utilities: `format_date`, `format_datetime`, `format_datetime`, `http_date`, `pretty_timedelta` (see [source:trunk/trac/chrome.py chrome.py]), or even the `$dateinfo()` macro.
     269
     270Those utilities automatically take into account the ''timezone'' information set by the user, so that the dates are presented in a meaningful way to him.