Fakultas Ilmu Komputer UI

Commit b64e0763 authored by Putri Salsabila's avatar Putri Salsabila
Browse files

[REFACTOR] Revise timezone when submit to json

parent fe9d8106
Pipeline #81422 failed with stages
in 2 minutes and 5 seconds
......@@ -121,9 +121,17 @@ class _AddKegiatanState extends State<AddKegiatan> {
);
var newKegiatanData = newKegiatan.toJson();
if (newKegiatanData['zona_waktu'] == 'WIT') {
newKegiatanData['time_start'] = newKegiatanData['time_start']+'+0900';
}
else if (newKegiatanData['zona_waktu'] == 'WITA') {
newKegiatanData['time_start'] = newKegiatanData['time_start']+'+0800';
}
else {
newKegiatanData['time_start'] = newKegiatanData['time_start']+'+0700';
}
var multipartImageList = <MultipartFile>[];
newKegiatanData['place_id'] = widget.placeId;
// newKegiatanData['zona_waktu'] = 'WIB';
if (images != null) {
for (var asset in images) {
......
......@@ -260,7 +260,7 @@ class _DetailPostKegiatanPageState extends State<DetailPostKegiatanPage> {
),
SizedBox(width: 15),
Text(
'${DateFormat('hh:mm').format(widget.kegiatan.timeStart)}',
'${DateFormat('HH:mm').format(widget.kegiatan.timeStart)}',
style: TextStyle(fontSize: 16),
key: Key('Text Waktu Pelaksanaan'),
),
......
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