Reverted date commands to GNU Date commands
Added detection of date version. Tries to use gdate