A pious Muslim has always to be cautious about the sources of his earnings. Unlawful earnings invoke the wrath of Almighty Allah and endangers the Muslim’s life in the Hereafter as he will be held accountable for such gains. The amount of lawful jobs are surely more than those that are unlawful. A Muslim has to exert effort in looking for a permissible job and Almighty Allah will help him in this regard.
Regarding the issue of zakah, if the money one saved reached the nisab (minimum zakatable amount), one must pay zakah on it, as he earned it without knowing that it is haram to serve pork and alcohol even for non-Muslims.
On this, Dr. `Abdul-Fattah Idrees, a professor of comparative jurisprudence, said that
‘As you did not know the prohibition of working in such places, you are allowed to make use of the money you gained during this period because you exerted effort in return for this money without knowing the prohibition of its source. Therefore, it is permissible for you to spend it on your preparation for marriage and such lawful purposes.
In conclusion, as the issue of zakah is concerned, if the money you saved during this period has reached the nisab, then you have to give out its zakah according to the percentage prescribed by the sharia.’