fixed tenders detail date times
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
String timeConvertor(int time) {
|
import 'package:intl/intl.dart';
|
||||||
DateTime date = DateTime.fromMillisecondsSinceEpoch(time);
|
|
||||||
|
|
||||||
String formattedDate =
|
String timeConvertor(int timestamp) {
|
||||||
"${date.year}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}";
|
// Convert seconds → milliseconds
|
||||||
|
final date = DateTime.fromMillisecondsSinceEpoch(timestamp * 1000);
|
||||||
|
|
||||||
return formattedDate;
|
// Format to yyyy-MM-dd
|
||||||
|
return DateFormat('yyyy-MM-dd').format(date);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user