If you were not properly advised of the consequences of your plea, including immigration consequences (e.g. that a sentence of 365 days or more can make you redeportable or excludable) then you may have grounds to withdraw your plea for ineffective assistance of counsel. This needs be done by way of writ of habeas corpus. This can be done now or when you are released from county jail. Feel free to call me for a free consultation.
I agree that you may have a motion to withdraw plea if you were not properly advised. Call the Public Defender's office immediately and speak to the attorney or a supervisor. Ask them to put the matter back on calendar. The court (if the DA is also agreeable to this) may allow you to withdraw plea and enter new plea to 364 for this purpose. It's been done.