fixed strftime if/else statement