Bug 12580 - Avoid use of local time in opkg-build
Summary: Avoid use of local time in opkg-build
Status: RESOLVED FIXED
Alias: None
Product: opkg
Classification: Yocto Project Subprojects
Component: opkg (show other bugs)
Version: 0.3.6
Hardware: All Multiple
: Undecided normal
Target Milestone: 0.4.0
Assignee: Alejandro del Castillo
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2018-03-04 14:02 UTC by Peter Urbanec
Modified: 2018-11-26 16:22 UTC (History)
0 users

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Urbanec 2018-03-04 14:02:06 UTC
Currently opkg-build converts the output of date to a formatted string in UTC and passes that as an argument to tar --mtime. This can cause issues because the reverse conversion is done with respect to the current timezone. The formatted string does not encode the correct timezone, which in the current code is UTC.

There was a patch submitted that removes the UTC option and uses local time for the string generation. A simpler method would be to feed --mtime the Unix time as an integer, rather than trying to convert to a formatted string and then parsing it back.
Comment 1 Peter Urbanec 2018-03-04 14:24:23 UTC
The Unix epoch time is represented by prepending the @ symbol to the integer. For example '@1234567890' will be treated as 'Sat, 14 Feb 2009 10:31:30 +1100' or '2009-02-14T10:31:30+11:00'
Comment 2 Alejandro del Castillo 2018-11-26 16:22:45 UTC
fixed on e911b8248324a198c39b508ab9e1459017ab1f22