Penal Code 825 says a person who is arrested must be brought to court within 48 hours (not including weekends and court holidays) of arrest. If the District Attorney has not filed charges by that time, the person must be released from custody.
The District Attorney can still file charges at any time up to the expiration of the statute of limitations -- a year for most misdemeanors, and three years (or more, depending on the charge) for felonies.
Please understand that this is a general discussion of legal principles by a California lawyer and does not create an attorney/client relationship. It's impossible to give detailed, accurate advice based on a few sentences on a website (and you shouldn't provide too much specific information about your legal matter on a public forum like this site, anyway). You should always seek advice from an attorney licensed in your jurisdiction who can give you an informed opinion after reviewing all of the relevant information.
The magic words you want to hear are "DA reject". If the DA looks at your case but decides not to file charges against you they will "reject" your case for filing consideration. If they do, you may be home free!!! But beware, some city prosecutors live for cases the DA doesn't want to waste their time on.
Call the DA's office and ask them if they are going to file charges against you. If they say they "rejected" your case, then ask them if they passed it on to the city attorney's office. If so, then call the city prosecutor and ask them if they are going to file charges. If both offices reject your case then you are home free. As attorney Marshall pointed out, prosecutors have up to a year on misdemeanor and three (or more) years on felonys, but if the DA and the CA both reject your case, then there is about a 0.001% you will be prosecuted later.
I have practiced in CA for 30 years now. I have never heard of a City Attorney prosecuting a case whether the DA rejected it or not. The DA is the prosecutorial arm of government not the City Attorney. Where this bizarre idea comes from is beyond me.