luigi
luigi copied to clipboard
`datetime.utcfromtimestamp()` converts `time.time()` to wrong datetime value in `luigi.tools.range.RangeBase`
datetime.utcfromtimestamp()
is used in the source code, which converts time.time()
or self.now
parameter value to the wrong datetime instance.
https://github.com/spotify/luigi/blob/829fc0c36ecb4d0ae4f0680dec6d538577b249a2/luigi/tools/range.py#L219
now = datetime.utcfromtimestamp(time.time() if self.now is None else self.now)
It should be:
now = datetime.fromtimestamp(time.time() if self.now is None else self.now)