mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2025-12-13 03:25:45 +00:00
Tidy up 'last_checked' date handling
This commit is contained in:
@@ -57,7 +57,7 @@ def _jinja2_filter_datetime(watch_obj, format="%Y-%m-%d %H:%M:%S"):
|
|||||||
if watch_obj['last_checked'] == 0:
|
if watch_obj['last_checked'] == 0:
|
||||||
return 'Not yet'
|
return 'Not yet'
|
||||||
|
|
||||||
return datetime.datetime.utcfromtimestamp(int(watch_obj['last_checked'])).strftime(format)
|
return timeago.format(int(watch_obj['last_checked']), time.time())
|
||||||
|
|
||||||
|
|
||||||
# @app.context_processor
|
# @app.context_processor
|
||||||
|
|||||||
@@ -8,14 +8,13 @@
|
|||||||
<legend>Add new change detection watch</legend>
|
<legend>Add new change detection watch</legend>
|
||||||
<input type="url" placeholder="https://..." name="url"/>
|
<input type="url" placeholder="https://..." name="url"/>
|
||||||
<input type="text" placeholder="tag" size="10" name="tag"/>
|
<input type="text" placeholder="tag" size="10" name="tag"/>
|
||||||
<button type="submit" class="pure-button pure-button-primary">Save</button>
|
<button type="submit" class="pure-button pure-button-primary">Watch</button>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<!-- add extra stuff, like do a http POST and send headers -->
|
<!-- add extra stuff, like do a http POST and send headers -->
|
||||||
<!-- user/pass r = requests.get('https://api.github.com/user', auth=('user', 'pass')) -->
|
<!-- user/pass r = requests.get('https://api.github.com/user', auth=('user', 'pass')) -->
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<!-- make a nice list of tags here to click on -->
|
|
||||||
<i>Note: Times are in UTC for now - todo - JS front end format<br/></i>
|
|
||||||
<div id="watch-table-wrapper">
|
<div id="watch-table-wrapper">
|
||||||
<table class="pure-table pure-table-striped watch-table">
|
<table class="pure-table pure-table-striped watch-table">
|
||||||
<thead>
|
<thead>
|
||||||
|
|||||||
Reference in New Issue
Block a user