Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- gpshour = nmea.getHour();
- gpsminute = nmea.getMinute();
- // Timezone correction
- if (gpshour == 0 || gpshour <= 13)
- {
- gpshour += timeZoneOffset;
- }
- else
- {
- gpshour -= (24 - timeZoneOffset);
- }
- // Convert to 12hr time instead of 24hr time?
- if (twelveHourTime)
- {
- if (gpshour == 0)
- {
- gpshour = 12;
- }
- else if (gpshour > 12)
- {
- gpshour -= 12;
- }
- }
- // Hours
- e = (char)gpshour / 10;
- f = (char)gpshour % 10;
- // Minutes
- g = (char)gpsminute / 10;
- h = (char)gpsminute % 10;
- if (e > 9)
- {
- e = 0;
- }
- if (e < 0)
- {
- e = 0;
- }
- if (f > 9)
- {
- f = 0;
- }
- if (f < 0)
- {
- f = 0;
- }
- if (g > 9)
- {
- g = 0;
- }
- if (g < 0)
- {
- g = 0;
- }
- if (h > 9)
- {
- h = 0;
- }
- if (h < 0)
- {
- h = 0;
- }
- RefreshTimeClock();
Advertisement
Add Comment
Please, Sign In to add comment