W dniu sobota, 1 kwietnia 2017 01:41:14 UTC+2 użytkownik Xavier Ordoquy 
napisał:
>
>
> That put apart the default behavior would be to return the timezone 
> informations so your client can do the translation by itself.
> I remember an API (written with DRF) that was returning the ISO string (so 
> UTC) and angular converted it to the local timezone (CET by that time) 
> shift appropriately the time.
> My bet here, you don’t provide TZ information so your JS client may not 
> perform the correct translation.
>
>
>
>
Are you saying date translation should only be done on the client ? Unlike 
in Django, which is happy to translate the date for you ? More code 
duplication. Is there anything conceptually wrong with an API providing a 
translated date according to request language ?

Marek

-- 
You received this message because you are subscribed to the Google Groups 
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to