Hi,

I'm trying to get a handle on the modified_time() method in the Storages
API. I couldn't find any hints in the doc as to what the right way to
implement the modified_time() method was in regard to timezones. Currently
it looks like the default FileSystemStorage backend returns the modified
time as returned from os.path.getmtime() which is in the system timezone.

Should the modified time as returned by modified_time() be in the system
timezone (this is not the TIME_ZONE setting)? i.e. the FileSystemStorage is
the de-facto standard?

The reason I ask this is because it raises an issue when using other
different backends together since the collectstatic command will compare
modified times of files from the different backends to determine if it
needs to update the file. We have problems with this because some systems
like AWS's S3 will return the modified time in UTC or some other timezone
and need to be converted.

-- 
Ian

http://www.ianlewis.org/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPBt0Q0CSfNeGmaok%3DUeOoN2NYVxvpoo6KoRAsSkHyNGxUkQew%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to