Fakultas Ilmu Komputer UI

Commit 214c1b96 authored by Muhammad Rafif Elfazri's avatar Muhammad Rafif Elfazri
Browse files

[GREEN] Implement Change date format

parent 799b08a6
Pipeline #79430 failed with stages
in 4 minutes and 17 seconds
......@@ -73,7 +73,7 @@ class KegiatanSerializerRead(KegiatanSerializer):
time = obj.time_start
zona_waktu = obj.zona_waktu
time = time_converter(time, zona_waktu)
return time.strftime('%Y-%m-%dT%H:%M')
return time.strftime('%Y-%m-%d %H:%M')
def get_time_end(self, obj):
time = obj.time_end
......@@ -81,7 +81,7 @@ class KegiatanSerializerRead(KegiatanSerializer):
if time is None:
return None
time = time_converter(time, zona_waktu)
return time.strftime('%Y-%m-%dT%H:%M')
return time.strftime('%Y-%m-%d %H:%M')
class KomentarKegiatanSerializer(serializers.ModelSerializer):
kegiatan = serializers.IntegerField(source='kegiatan.id', read_only=True)
......
......@@ -202,7 +202,7 @@ SOCIALACCOUNT_PROVIDERS = {
LOGIN_REDIRECT_URL = '/'
REST_FRAMEWORK = {
'DATETIME_FORMAT': "%Y-%m-%dT%H:%M%z",
'DATETIME_FORMAT': "%Y-%m-%d %H:%M%z",
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
'PAGE_SIZE': 10,
'DEFAULT_AUTHENTICATION_CLASSES': [
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment