Fix incorrect time handling for env plugin