Bug 12580

Summary: Avoid use of local time in opkg-build
Product: [Yocto Project Subprojects] opkg Reporter: Peter Urbanec <bugzilla.yoctoproject.org>
Component: opkgAssignee: Alejandro del Castillo <alejandro.delcastillo>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Undecided    
Version: 0.3.6   
Target Milestone: 0.4.0   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

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