fixed tenders detail date times
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
String timeConvertor(int time) {
|
||||
DateTime date = DateTime.fromMillisecondsSinceEpoch(time);
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
String formattedDate =
|
||||
"${date.year}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}";
|
||||
String timeConvertor(int timestamp) {
|
||||
// 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