in reply to gmtime

You might want to check out Date::Parse it should give you some easy variables to use and convert to the format you want. Date::Format is another module worth checking out for this.
Good Luck