fpgettimeofday() is wrong and inaccurate
Original Reporter info from Mantis: zeljko@holobit.net @zeljan1
-
Reporter name: Zeljan Rikalo
Original Reporter info from Mantis: zeljko@holobit.net @zeljan1
- Reporter name: Zeljan Rikalo
Description:
using gettimeofday() from kernel result in wrong time eg. due to daylight saving changes or ntpd sync of clock.
Solution: use clock_gettime() from kernel, or in case that there's no better solution use localtime_r() from libc unit on linux.
This bug affects 2.4.XX, 2.6.XX and 2.7.XX
Steps to reproduce:
Change daylight savings and check result in you running application.
I've run into problem with our 24/7 daemons compiled with 2.4.5
Mantis conversion info:
- Mantis ID: 20604
- OS: Linux
- OS Build: 2.6
- Platform: i386/x86_64
- Version: 2.4.5