diff options
author | Jim Winstead <jimw@mysql.com> | 2009-05-07 11:17:07 -0700 |
---|---|---|
committer | Jim Winstead <jimw@mysql.com> | 2009-05-07 11:17:07 -0700 |
commit | df3887f913fa22290e3c05074b7eab1473da1d61 (patch) | |
tree | 8b0b3b11a43bf8a1d828209bd4c2e2b9ae0543c8 /mysys/mf_getdate.c | |
parent | 3fe1d299ec01e58ae5afc03dc269a70054ec8865 (diff) | |
download | mariadb-git-df3887f913fa22290e3c05074b7eab1473da1d61.tar.gz |
The get_date() function in mysys interpreted the GETDATE_GMT option
backwards, which resulted in the incorrect time being reported at the
end of mysqldump. (Bug #44424, patch by Andrew Hutchings)
Diffstat (limited to 'mysys/mf_getdate.c')
-rw-r--r-- | mysys/mf_getdate.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mysys/mf_getdate.c b/mysys/mf_getdate.c index 1ced312848e..247172014d8 100644 --- a/mysys/mf_getdate.c +++ b/mysys/mf_getdate.c @@ -45,15 +45,15 @@ void get_date(register my_string to, int flag, time_t date) skr=date ? (time_t) date : time((time_t*) 0); #if defined(HAVE_LOCALTIME_R) && defined(_REENTRANT) if (flag & GETDATE_GMT) - localtime_r(&skr,&tm_tmp); - else gmtime_r(&skr,&tm_tmp); + else + localtime_r(&skr,&tm_tmp); start_time= &tm_tmp; #else if (flag & GETDATE_GMT) - start_time= localtime(&skr); - else start_time= gmtime(&skr); + else + start_time= localtime(&skr); #endif if (flag & GETDATE_SHORT_DATE) sprintf(to,"%02d%02d%02d", |