From 72130ca09a6325af6a5bd52313824b73c1cd6f3a Mon Sep 17 00:00:00 2001 From: keannu125 Date: Thu, 9 Mar 2023 23:20:36 +0800 Subject: [PATCH] Revised date formatting for serializers.py --- ivy/products/serializers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ivy/products/serializers.py b/ivy/products/serializers.py index 5b739f3..8329993 100644 --- a/ivy/products/serializers.py +++ b/ivy/products/serializers.py @@ -12,7 +12,7 @@ class HistoricalRecordField(serializers.ListField): class ProductSerializer(serializers.HyperlinkedModelSerializer): date_added = serializers.DateTimeField( - format="%d-%m-%Y %I:%M%p", read_only=True) + format="%m-%d-%Y %I:%M%p", read_only=True) quantity = serializers.IntegerField(required=False, default=0) history = HistoricalRecordField(read_only=True) @@ -24,7 +24,7 @@ class ProductSerializer(serializers.HyperlinkedModelSerializer): class LogSerializer(serializers.HyperlinkedModelSerializer): history_date = serializers.DateTimeField( - format="%d-%m-%Y %I:%M%p", read_only=True) + format="%m-%d-%Y %I:%M%p", read_only=True) history_user = serializers.ReadOnlyField(source='history_user.username') class Meta: