[yocto] Yocto uses UTC time for DATETIME instead of localtime
Григорьева Алёна Вадимовна
grigorieva_a at ekra.ru
Tue Jun 5 04:02:46 PDT 2018
Hello, Davis Roman!
The only way to change ${DATE} and ${TIME} is to change python function:
def buildSetVars(self):
"""
Setup any variables needed before starting a build
"""
t = time.gmtime() <---- here use localtime()
if not self.data.getVar("BUILDNAME", False):
self.data.setVar("BUILDNAME", "${DATE}${TIME}")
self.data.setVar("BUILDSTART", time.strftime('%m/%d/%Y %H:%M:%S',
t))
self.data.setVar("DATE", time.strftime('%Y%m%d', t))
self.data.setVar("TIME", time.strftime('%H%M%S', t))
file: /sources/poky/bitbake/lib/bb/cooker.py
Alena Grigorieva
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20180605/1d74fa4b/attachment.html>
More information about the yocto
mailing list