~dylanmccall/harvest/gsoc-client-stuff

« back to all changes in this revision

Viewing changes to scripts/util.py

  • Committer: Daniel Holbach
  • Date: 2008-08-28 06:59:54 UTC
  • mfrom: (96.1.15 short-header)
  • Revision ID: daniel.holbach@canonical.com-20080828065954-kkks5oii8eegowa0
Merged with Benjamin, changed handler.py to not import database directly, but use scripts instead.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
 
15
15
def html_report_timestamp():
16
16
    (dummy, datetime, dummy) = os.popen3("date -R")
17
 
    return "<p>Last updated at: <i>%s</i></p>" % datetime.read()
 
17
    return '<p>Last updated at: <span class="last_updated">%s</span></p>' % datetime.read().strip()
18
18
 
19
19
def specify_interval(timestamp, short=True):
20
20
    interval = time.gmtime(time.time()+time.timezone-time.daylight*60*60-timestamp)