Just an idea,

if the c++ mktime is causing trouble because it need DST info, eventually Julian Day can be used instead?

I.e. the current code is calculating UTC, this can perhaps be done like this:

- get local time from the mount
- get date from the mount
- get utc-offset from the mount

- calculate Julian day from local time and date above
- add utc-offset (converted to julian hours)
- reverse the Julian day calculation back to Gregorian time and date and the returned time is UTC

this calculation is mount independent

Read More...