Example #1
0
static void update_date_display() {
  time_t skip_utc = s_skip_until - get_UTC_offset(NULL);
  struct tm *t = localtime(&skip_utc);
  strftime(s_date, LEN_DATE, "%a, %b %d", t);
  s_show_noskip = (s_skip_until <= get_today());
  layer_mark_dirty(s_info_layer);
}
Example #2
0
static void update_date_display() {
  struct tm *t;
  time_t skip_utc = s_skip_until - get_UTC_offset(NULL);
  t = localtime(&skip_utc);
  strftime(s_date, sizeof(s_date), "%a, %b %d", t);
  text_layer_set_text(s_textlayer_date, s_date);
  layer_set_hidden(text_layer_get_layer(s_textlayer_status), s_skip_until > get_today());
}
Example #3
0
static time_t get_today() {
  return strip_time(time(NULL) + get_UTC_offset(NULL));
}