<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""></span>
This is wrong: you are using Year(), Month(), Day()... functions that assume a local date. It works only if the date is read in the same timezone as the write.<br></blockquote><div><br></div><div>The point is my way always assumes local date. Thus when "time zone" changes twice in a year, the dates and times keep the same, instead of being adjusted wrongly by hour.<br></div><div> </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

You have to, and just have to use CStr() and CDate(). I.e. write dates in UTC, and read them back in UTC.<br></blockquote><div><br></div><div>The problem is I'm not in UTC and my local time zone changes twice a year.</div><div><br></div><div><br></div><div>Jussi<br></div><br></div><br></div></div>