The getCurrentDateTime() function gets the current date and time in London and prints it to the console.
The DateTime.now() method returns the current date and time in the local time zone. In this case, the local time zone is London.
The print() function prints the value of the timeLondon variable to the console.
void main() {
getCurrentDateTime();
}
void getCurrentDateTime() {
var timeLondon = DateTime.now();
print('London: $timeLondon');
}
London: 2023-08-31 09:42:34.310135