Added support for both time formats