Today I faced interesting issue: I retrieved list item, saved its modification date to datetime object and and started to iterate through that list item's versions. In first iteration i tried to compare item's modification date and version's creation date (which at first iteration should be equal), but values was different by few hours, it worked out after I converted modified date to UTC, but that's a weak solution. Because all values was gotten from single list item object, their time formats (regional time/timezones) should be equal, so how should I convert and compare these values?
SharePoint stores its datetime fields in UTC time. If you don’t look at the data from SharePoint through the UI (the UI corrects datetime values according to local time), you need to correct the datetime fields with the UTC offset you have locally.