Epoch (unix time) field, timezone sensitive

NOTE: in this page, after slashes, described in japanese-KANJI.

Description

this plugin has two functionality: / 以下の二機能があります:

  1. Timezone sensitive date&time field / 時差を考慮した時刻フィールド
  2. date&time presentation in report / 時差を考慮したレポート表示

Bugs/Feature Requests

Existing bugs and feature requests for EpochFieldPlugin are here.
If you have any issues, create a new ticket. / 不具合報告はこちらへ。

Get A Plugin or Source

Download the zipped source from here.
You can check out EpochFieldPlugin from here using Subversion, or browse the source with Trac.
入手はzip, Subversion, Tracでどうぞ。

Example / 例

epoch field

specify format=epoch for the custom-field in trac.ini as follows(or use CustomFieldAdminPlugin): / trac.ini または CustomFieldAdminPlugin で、カスタムフィールドの format を epoch と指定します:

[ticket-custom]
due = text
due.format = epoch

this plugin uses jquery.datetimeentry.js. Ctrl-Home to current datetime. / Ctrl-Home で現在日時を入力できます。

epoch report

in trac.ini, specify field-names you want to translate from epoch to datetime-string in regular-expressions, as follows: / trac.ini で 日時表記したいカラム名を正規表現で指定して:

[epochfield]
date_columns = .*_date, .*日付?
datetime_columns = .*_datetime, .*日時
time_columns = .*_time, .*時刻

and, for example, report query as: / たとえば以下のようにSQLを書くと、

select id, summary, ticket.time,
    a.time as accepted_datetime,
    c.time as closed_datetime,
    c.author as Closer
from ticket
left join (
    SELECT ticket, author, newvalue AS status, max(time) AS time
        FROM ticket_change WHERE field = 'status' and status = 'accepted'
        GROUP BY ticket, newvalue
) AS a on (a.ticket = ticket.id and a.status = "accepted")
left join (
    SELECT ticket, author, newvalue AS status, max(time) AS time
        FROM ticket_change WHERE field = 'status' and status = 'closed'
        GROUP BY ticket, newvalue
) AS c on (c.ticket = ticket.id and c.status = "closed")

then the epoch columns (status change time in above example) shows as datetime string. / 更新日時といった列を unixtime ではなく日付文字列で表示します。

Recent Changes

[11455] by matobaa on 04/05/12 17:00:46

EpochFieldPlugin: adapt for python 2.4. thanks jun66j5

[11444] by matobaa on 03/31/12 10:06:11

EpochFieldPlugin: initial import

[11443] by matobaa on 03/31/12 10:00:53

New hack EpochFieldPlugin, created by matobaa

Author/Contributors

Author: matobaa
Maintainer: matobaa
Contributors:

Attachments