alexanderk23 / gluqlo

Gluqlo: Fliqlo for Linux
alexanderk.ru/gluqlo
ISC License
288 stars 50 forks source link

fix AM/PM display #8

Closed nshopik closed 7 years ago

nshopik commented 7 years ago

this should display AM and PM correctly, fixes #5

alexanderk23 commented 7 years ago

Sorry but this patch inverts the whole AMPM stuff and @skorpioskorpio reports that only 12 o'clock hours are inverted (thanks for the report by the way!) Actually, to fix the error we just need to replace

// draw am/pm
if(!twentyfourh) render_ampm(screen, &hourBackground, _time->tm_hour > 12);

with

// draw am/pm
if(!twentyfourh) render_ampm(screen, &hourBackground, _time->tm_hour >= 12);

This way, 12:00 becomes 12:00pm and 00:00 will be 12.00am. Thanks anyway! )

nshopik commented 7 years ago

Ah right, didn't notice 12 o'clock issue, but AMPM actually reversed anyway which is incorrect. shows AM time when its PM.

You want me to resubmit to fix both issues?

alexanderk23 commented 7 years ago

It would be nice, thank you! But are you sure that AM/PM is really reversed? now

nshopik commented 7 years ago

Looks like its 12 o clock actually mix up things, when I tested, so here fix just for 12 o clock then

alexanderk23 commented 7 years ago

Ok, thanks! :+1: