Just add a
CTimeSpan[
^]:
CTime AdjustedDateTime = LocalDateTime + CTimeSpan(0, -8, 0, 0);
To avoid problems with time zone conversions, all times should be stored as UTC and converted to local time for display.
As an alternative you can also use the
COleDateTime[
^] class.
To convert between local time and UTC use the Windows 32 API functions (see the below links).
For an overview of date and time handling functions for Windows see
Time Format Conversion Made Easy[
^] and
Date and Time in C++[
^].