Make datetime format independent from current locale

Thanks for Andrei Dziahel for the patch