Gender theory food?

So I've heard that if you crave salty foods then your likely to have a boy and if you crave sweet foods your likely to have a girl? Has this ever been true for anyone? The problem with me is, I craved salty foods up until 11 weeks pregnancy. Now I'm 15 weeks and all I'm craving is sweets! Is there a certain stage in pregnancy when cravings should occur?