title: Django Rest framework custom serialize a field
body: <p>I just started using Django REST framework and need to customize a DATETIME field to unix epoch (integer) when serializing it</p>
  
  <p>i currently have</p>
  
  <pre><code>/models.py
  class Snippet(models.Model):
      created = models.DateTimeField(auto_now_add=True)
  
  /serializers.py
  class SnippetSerializer(serializers.ModelSerializer):
      class Meta:
          model = Snippet
          fields = ('created')
  </code></pre>
  
  <p>When I call snippets through API, i get typical DATETIME in STR format .  </p>
  
  <p>How can I change SnippetSerializer to convert to EPOCH.  Also, when someone is posting information, it will come back to me in EPOCH, which I would need to convert to DATETIME .  Any ideas?</p>