diff options
| author | James Aylett <james@tartarus.org> | 2014-11-15 11:57:53 +0100 |
|---|---|---|
| committer | James Aylett <james@tartarus.org> | 2014-11-15 11:57:53 +0100 |
| commit | 88e13b44edaaad8a49ec0e6a1195b7ca12333b77 (patch) | |
| tree | 0d588be59fa4c9616dbf2858612a5f2b8a478e55 /docs/ref/files | |
| parent | 4f90c99635149fae2f488c03f0b52303fe97e0aa (diff) | |
Fixed #23827 -- TZ behavior in Storage API ref doc
This is derived from the current behaviour of FileSystemStorage.
Note that since this was not previously documented, other
implementations may not currently conform.
Diffstat (limited to 'docs/ref/files')
| -rw-r--r-- | docs/ref/files/storage.txt | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/docs/ref/files/storage.txt b/docs/ref/files/storage.txt index 1d84254f41..a16b6b6c9d 100644 --- a/docs/ref/files/storage.txt +++ b/docs/ref/files/storage.txt @@ -82,17 +82,25 @@ The Storage Class behaviors that all other storage systems can inherit or override as necessary. + .. note:: + For methods returning naive ``datetime`` objects, the + effective timezone used will be the current value of + ``os.environ['TZ']``; note that this is usually set from + Django's :setting:`TIME_ZONE`. + .. method:: accessed_time(name) - Returns a ``datetime`` object containing the last accessed time of the - file. For storage systems that aren't able to return the last accessed - time this will raise ``NotImplementedError`` instead. + Returns a naive ``datetime`` object containing the last + accessed time of the file. For storage systems that aren't + able to return the last accessed time this will raise + ``NotImplementedError`` instead. .. method:: created_time(name) - Returns a ``datetime`` object containing the creation time of the file. - For storage systems that aren't able to return the creation time this - will raise ``NotImplementedError`` instead. + Returns a naive ``datetime`` object containing the creation + time of the file. For storage systems that aren't able to + return the creation time this will raise + ``NotImplementedError`` instead. .. method:: delete(name) @@ -139,9 +147,10 @@ The Storage Class .. method:: modified_time(name) - Returns a ``datetime`` object containing the last modified time. For - storage systems that aren't able to return the last modified time, this - will raise ``NotImplementedError`` instead. + Returns a naive ``datetime`` object containing the last + modified time. For storage systems that aren't able to return + the last modified time, this will raise + ``NotImplementedError`` instead. .. method:: open(name, mode='rb') |
