When the annual Muslim festival starts on 20 July, visitors to Dubai will see a different side to the city with shorter business days and a quieter nightlife scene.

Ramadan -- the annual Muslim festival of fasting, sacrifice and worship -- gets underway across the world on 20 July and will last for 29 or 30 days, depending on lunar sightings.

Those used to Dubai’s fast-paced nature will see a different side to the city as locals conservative Muslim roots come to the fore, with shorter business days, a quieter nightlife scene and an emphasis on spending time with loved ones. And for  visitors to the city, there are a few dos and don’ts that will help you best enjoy this time of charity and peace.

Do visit. Dubai does not shut down completely during Ramadan. Many expats and visitors to the city enjoy this time of year because most things remain open but the city empties out as both Muslims and expats head off for cooler shores. Public transport and taxis operate as normal, although come sunset most taxi drivers will stop for a while to break their fast. Muslims do not eat, drink or smoke between sunrise and sunset for the length of Ramadan, and in Dubai everyone must follow this rule. Alcohol is not banned during the Holy Month (like it is in nearby Qatar or Bahrain) and Dubai’s tourist attractions like the Burj Khalifa (the tallest building in the world) or Wild Wadi Waterpark will not be as busy.

Make an effort to understand this religious time of year and what it means to the city. Visit Jumeirah Mosque  where tour guides can explain how important this time of year is to Muslims for reflection and prayer, as they use the month to focus on their actions over the past year and to cleanse themselves for Eid al Fitr, the festival that marks the end of Ramadan with a celebratory feast.

Go to an iftar -- the meal Muslims' break their fast with every evening at sunset. Almost every hotel offers an all-you-can-eat iftar feast during Ramadan, serving traditional Emirati and Arabic foods like slow cooked lamb and rice, as well as plenty of dates for energy for the next day. Beachside hotels like the Atlantis and Jumeirah Beach Hotel often erect grand iftar tents where people come to eat, play board games and smoke shisha, the flavoured tobacco synonymous with the Middle East that is smoked through a hookah pipe.

During Ramadan, dress codes get more conservative. Dubai is usually relatively liberal, but during the Holy Month women should cover their shoulders and their legs down to their knees when out in public -- carry a pashmina or a shawl if you do not want to wear lots of layers. For men, it is shirts or T-shirts as usual but make sure shorts are knee length. Expect uncomfortable stares or even a fine if you ignore this rule during the Holy Month.

Everyone has to abide by the “do not eat, drink, smoke or chew gum in public between sunrise and sunset rule” -- and that includes tourists. These laws can be punished with fines or even jail time if broken. Restaurants will not be open during the day, but there are some designated cafes open for non-Muslims hidden away behind curtains in most shopping malls; ask at mall information booths for their location if you need a soft drink or a snack. It’s easy to get dehydrated if you are not used to the summer heat.

Don’t expect bars to open before 8 pm (depending on the time of sunset). Bars are open (clubs are not) during Ramadan, but they will be quieter and will not play any music, live or otherwise. You can still get a drink, however, once the sun goes down.

Georgina Wilson-Powell is the Dubai Localite for BBC Travel. She also writes sogoodtogetoutofthecity.wordpress.com.

Correction: A previous version of this article incorrectly identified the Islamic New Year. This has been fixed.

Around the BBC