Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 274359 Details for
Bug 368419
media-gfx/exiv2 has off by 1 hour date error for -T option
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
The patch
exiv2-0.21.1-offby1time-fix.patch (text/plain), 2.01 KB, created by
Jason A. Donenfeld
on 2011-05-23 05:15:03 UTC
(
hide
)
Description:
The patch
Filename:
MIME Type:
Creator:
Jason A. Donenfeld
Created:
2011-05-23 05:15:03 UTC
Size:
2.01 KB
patch
obsolete
>Index: trunk/src/actions.cpp >=================================================================== >--- trunk/src/actions.cpp (revision 2474) >+++ trunk/src/actions.cpp (revision 2475) >@@ -104,11 +104,11 @@ > */ > int str2Tm(const std::string& timeStr, struct tm* tm); > >- //! Convert a UTC time to a string "YYYY:MM:DD HH:MI:SS", "" on error >+ //! Convert a localtime to a string "YYYY:MM:DD HH:MI:SS", "" on error > std::string time2Str(time_t time); > > //! Convert a tm structure to a string "YYYY:MM:DD HH:MI:SS", "" on error >- std::string tm2Str(struct tm* tm); >+ std::string tm2Str(const struct tm* tm); > > /*! > @brief Copy metadata from source to target according to Params::copyXyz >@@ -1565,7 +1565,7 @@ > << " " << _("years") << "\n"; > return 1; > } >- time_t time = timegm(&tm); >+ time_t time = mktime(&tm); > time += adjustment_ + dayAdjustment_ * 86400; > timeStr = time2Str(time); > if (Params::instance().verbose_) { >@@ -1739,7 +1739,7 @@ > int Timestamp::read(struct tm* tm) > { > int rc = 1; >- time_t t = mktime(tm); >+ time_t t = mktime(tm); // interpret tm according to current timezone settings > if (t != (time_t)-1) { > rc = 0; > actime_ = t; >@@ -1783,22 +1783,18 @@ > tm->tm_sec = tmp; > > // Conversions to set remaining fields of the tm structure >- time_t time = timegm(tm); >-#ifdef EXV_HAVE_GMTIME_R >- if (time == (time_t)-1 || gmtime_r(&time, tm) == 0) return 11; >-#else >- if (time == (time_t)-1 || std::gmtime(&time) == 0) return 11; >-#endif >+ if (mktime(tm) == (time_t)-1) return 11; >+ > return 0; > } // str2Tm > > std::string time2Str(time_t time) > { >- struct tm* tm = gmtime(&time); >+ struct tm* tm = localtime(&time); > return tm2Str(tm); > } // time2Str > >- std::string tm2Str(struct tm* tm) >+ std::string tm2Str(const struct tm* tm) > { > if (0 == tm) return ""; > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 368419
:
274357
| 274359