diff options
| author | Tom Harley | 2021-07-06 18:30:31 +0000 |
|---|---|---|
| committer | Tom Harley | 2021-07-06 18:30:31 +0000 |
| commit | 0a0007dee01f2bf17371967105a6ab3c43f85550 (patch) | |
| tree | 9e01b8fa0f677a6bcd650afbb022c67a53ef3b4b /sw/time.py | |
| parent | Add nixfmt to project (diff) | |
| download | swap-0a0007dee01f2bf17371967105a6ab3c43f85550.tar.gz swap-0a0007dee01f2bf17371967105a6ab3c43f85550.zip | |
Begin work on adding user interaction
This commit adds support for getting information about a user, as well as accessing their inbox (not actually getting a CollectionPage yet, though).
Currently the inbox does not require the right user to be logged in to access their personal inbox; this should be fixed.
Diffstat (limited to 'sw/time.py')
| -rw-r--r-- | sw/time.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sw/time.py b/sw/time.py new file mode 100644 index 0000000..8111232 --- /dev/null +++ b/sw/time.py @@ -0,0 +1,9 @@ +from datetime import datetime + + +def time_formatted(t): + return t.replace(microsecond=0).isoformat() + + +def now(): + return time_formatted(datetime.now()) |
