tags:

views:

59

answers:

3
+1  Q: 

Django Time issues

Hi everyone, My app in django requires to tell the user what time an action occurred. Aside from asking the user what timezone he/she is in, is it possible for me to generate the time on the client end?

Off the top of my head, are there a particular representation of time that is timezone independent, (unix time?), and then I can simply paste it into the html and have the client end (browser) findout the timezone and then do the calculation?

+2  A: 

I'd make all my times UTC, as that's a good international-level reference point, and you can always shift that to a local time, given that you know the user's TZ.

I'd also use the time on the server (datetime.datetime.now()) rather than rely on the client's system clock, as this makes it easy to fake what time something happened at.

stevejalim
+2  A: 

Havent used it myself, but I think this is what you are looking for.

zsquare
+1  A: 

i think you are looking for L10n (localization) yes ???

singularity