Last active
December 12, 2015 01:29
-
-
Save rvause/4691869 to your computer and use it in GitHub Desktop.
Not working in all timezones, need to fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from jingo import register | |
| @register.filter | |
| def beats(obj): | |
| t = obj.timetuple() | |
| bmt = (t.tm_hour * 3600) + (t.tm_min * 60) + t.tm_sec | |
| return '%.0f' % (bmt / 86.375) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment