- changed status to resolved
Fix libmonit Time unit test
Issue #50
resolved
Time_parse returns Unix timestamp in local time via mktime. Unfortunately the Time unit test assert against a Unix timestamp which is only valid in CET. That is, the unit test will fail if run in a different timezone. Possible solutions in recommended order
- Remove Time_parse which is not used in Monit along with other Time functions not used
- Parse in GMT via timegm which strictly speaking is more correct and safe
- Set timezone explicit (via tzset) to CET in the test
Comments (4)
-
reporter -
reporter - changed component to 2. Libmonit
-
reporter - changed component to Libmonit
-
reporter - removed version
Removing version: 5.8.1 (automated comment)
- Log in to comment
Fix issue
#50→ <<cset 8015f091644c>>