Actually switch labels in morning

This commit is contained in:
Neale Pickett 2015-07-21 06:32:13 -06:00
parent 3e1579bc6f
commit f7a6a5bb0b
1 changed files with 9 additions and 6 deletions

View File

@ -41,7 +41,15 @@ static void bg_update_proc(Layer *layer, GContext *ctx) {
int hour = 3 * (i+1); int hour = 3 * (i+1);
if (1 && clock_is_24h_style()) { if (1 && clock_is_24h_style()) {
hour += 12; time_t epoch;
struct tm *now;
time(&epoch);
now = localtime(&epoch);
if (now->tm_hour > 12) {
hour += 12;
}
} }
snprintf(s_hour[i], 3, "%d", hour); snprintf(s_hour[i], 3, "%d", hour);
@ -120,11 +128,6 @@ static void window_load(Window *window) {
for (int i = 0; i < 4; i += 1) { for (int i = 0; i < 4; i += 1) {
int x, y; int x, y;
GTextAlignment align; GTextAlignment align;
int hour = 3 * (i+1);
if (1 && clock_is_24h_style()) {
hour += 12;
}
switch (i) { switch (i) {
case 0: case 0: