I have a Django model:
class Clinic(models.Model):
NAME_MAX_LENGTH = 150
name = models.CharField(max_length=NAME_MAX_LENGTH,blank=False,null=False)
start_at = models.DateTimeField(blank=False,default=timezone.now)
the client sends the start_at field as a time field with timezone like
{
start_at : "12:40:10+04:30"
}
I want to convert this time field into the DateTimeField with the current date as the date and then save it into the database as a timezone-aware DateTimeField.
I want to serialize this field and extract timezone info from the input and then create my DateTimeField object. How can I do this in rest_framework serializer?