Skip to content

Commit

Permalink
Merge branch '3.x' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
adonais committed Jul 27, 2023
1 parent c6be76e commit 723038b
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/eu_about.c
Original file line number Diff line number Diff line change
Expand Up @@ -3149,9 +3149,9 @@ static const uint8_t wc_buffer[29409] = {
static time_t
get_compiler_time(char const *date_, char const *time_)
{
char s_month[5];
int year;
struct tm t;
char s_month[5];
const char month_names[] = "JanFebMarAprMayJunJulAugSepOctNovDec";
sscanf(date_, "%s %d %d", s_month, &t.tm_mday, &year);
sscanf(time_, "%2d %*c %2d %*c %2d", &t.tm_hour, &t.tm_min, &t.tm_sec);
Expand All @@ -3160,7 +3160,7 @@ get_compiler_time(char const *date_, char const *time_)
t.tm_mon = (int)((strstr(month_names, s_month) - month_names) / 3);
t.tm_year = year - 1900;
t.tm_isdst = -1;
return mktime(&t);
return _mkgmtime(&t);
}

/* End of HyperLink URL */
Expand Down Expand Up @@ -3660,6 +3660,16 @@ on_about_dialog(void)
uint64_t
on_about_build_id(void)
{
#ifndef ACTIONS_BUILDING
int zone = 0;
TIME_ZONE_INFORMATION tzi;
GetTimeZoneInformation(&tzi);
if ((zone = (int)tzi.Bias/60))
{
printf("If it is a local compilation, add this time offset, zone = %d\n", zone);
return (zone * 3600 + get_compiler_time(__DATE__, __TIME__));
}
#endif
return get_compiler_time(__DATE__, __TIME__);
}

Expand Down

0 comments on commit 723038b

Please sign in to comment.