datetime dart format print

#include <iostream>
#include <iomanip>
#include <chrono>
#include <ctime>

int main() {
    // Get the current system time
    auto currentTime = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());

    // Convert the time to a local time structure
    struct std::tm *localTime = std::localtime(&currentTime);

    // Format the local time using the Dart format
    char buffer[100];
    std::strftime(buffer, sizeof(buffer), "%Y-%m-%d %H:%M:%S", localTime);

    // Print the formatted time
    std::cout << buffer << std::endl;

    return 0;
}