| 2011 | // having the hours before UTC in the integer part and minutes fractionally. |
| 2012 | |
| 2013 | char *SzZone(real zon) |
| 2014 | { |
| 2015 | static char szZon[7]; |
| 2016 | |
| 2017 | if (zon == zonLMT) |
| 2018 | sprintf(szZon, "LMT"); |
| 2019 | else if (zon == zonLAT) |
| 2020 | sprintf(szZon, "LAT"); |
| 2021 | else if ((!us.fSeconds || us.fSecondHide) && RFract(RAbs(zon)) < rSmall) |
| 2022 | sprintf(szZon, "%d%c", (int)RAbs(zon), zon < 0.0 ? 'E' : 'W'); |
| 2023 | else |
| 2024 | sprintf(szZon, "%d:%02d%c", (int)RAbs(zon), (int)(RFract(RAbs(zon))*60.0+ |
| 2025 | rRound/60.0), zon < 0.0 ? 'E' : 'W'); |
| 2026 | return szZon; |
| 2027 | } |
| 2028 | |
| 2029 | |
| 2030 | // Return a string containing the given offset from UTC, given as a time zone |
no outgoing calls
no test coverage detected