|
|
|
|
@ -327,10 +327,8 @@ void on_region_changed(GtkComboBox *self, main_window *widgets){
|
|
|
|
|
time_t curtime = time(NULL);
|
|
|
|
|
struct tm *local = localtime(&curtime);
|
|
|
|
|
char *hour_str = yon_char_from_long(local->tm_gmtoff/3600);
|
|
|
|
|
char *minute = yon_char_from_long((local->tm_gmtoff%3600)/60);
|
|
|
|
|
name_string = yon_char_unite("(UTC ",local->tm_gmtoff>0?"+":"-",hour_str,":",minute,") ",_(parsed_sorted[i]),NULL);
|
|
|
|
|
name_string = yon_char_unite("(UTC ",local->tm_gmtoff>0?"+":"",strlen(hour_str)<2&&local->tm_gmtoff!=0?"0":"",hour_str,") ",_(parsed_sorted[i]),NULL);
|
|
|
|
|
free(hour_str);
|
|
|
|
|
free(minute);
|
|
|
|
|
free(zonereg);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -544,6 +542,9 @@ void config_init(){
|
|
|
|
|
if (size>0){
|
|
|
|
|
if (strcmp(parsed[0],"(null)\n")){
|
|
|
|
|
yon_char_remove_last_symbol(parsed[0],'\n');
|
|
|
|
|
if (strstr(parsed[0],"[")&&strstr(parsed[0],"]"))
|
|
|
|
|
main_config.ntp_default = strstr(parsed[0],"] ")+2;
|
|
|
|
|
else
|
|
|
|
|
main_config.ntp_default = parsed[0];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|