Changed get_datetime() a bit so it respects the user-configured locale (to use time formats with strings for days, months etc.)
Same commit as last time, except it merges.
The buffer being hardcoded to 19 (the size expected from the default time format),
strftime() would fail on any format returning a longer buffer.
Changed it from 19 to 64 to accomodate longer formats.