Problems using date-time library