Hello,
I have a conversion problem. When I convert UNIX timestamps to datetime representations, they are one hour off. Does this have to with the following mail (indeed we are now in DST) ?
http://www.cygwin.com/ml/cygwin/2003-10/msg00995.html
If you mean that timestamps for date/times in winter (i.e. not DST) are shown incorrectly, then yes this is a problem that afflicts many applications. From the referenced MS document:
"By rewriting the affected application(s) to use the appropriate Win32 API calls, this problem can be corrected. Under NTFS, the Win32 API GetFileTime"
Anything which uses the standard C calls unfortunately gets an adjusted value, and this is what most applications ported from Unix do, resulting in this problem. Microsoft did this to minimise the surprise to people using FAT file systems which were most common at the time. The decision to use the offset for today on all timestamps including those applying to a date when the offset would have (or will be) different was deliberate (Microsoft refuse to consider it a bug).
I suppose we could ask whether cygwin should replace the relevant calls with better alternatives. Otherwise implement your own or live with the pain.
Mark Thornton
-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/