<div dir="ltr"><div>Unfortunately no. I can't use any conversions between UTC and local time zone. See GAlarm from software farm.</div><div>If I want to set alarm to remind me of meeting at 12:00 and if that happens to be at date after time zone change, then the alarm is not shown at 12:00 in local time, but instead something complicated (11:00 or 13:00 depending on the change [+/-1 UTC]).</div><div><br></div><div>So, my only solution is to always assume local time.</div><div><br></div><div><br></div><div>Jussi<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 8, 2018 at 12:13 AM, Gianluigi <span dir="ltr"><<a href="mailto:bagonergi@gmail.com" target="_blank">bagonergi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">2018-06-07 22:55 GMT+02:00 Jussi Lahtinen <span dir="ltr"><<a href="mailto:jussi.lahtinen@gmail.com" target="_blank">jussi.lahtinen@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span></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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);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><span class="m_647393757217918737gmail-HOEnZb"><font color="#888888"><div><br></div><div><br></div><div>Jussi<br></div><br></font></span></div><br></div></div></blockquote><div><br></div><div><br></div></div></div><div>Hello Benoit, ML, Jussi, dear brothers in Gambas :-)<br>Thank you very much for the benevolent attention you dedicate to me.<br>It seems that on the dates, among the disciples of Benoit, constant confusion reigns.<br>I think we can summarize that the best thing to do is to create time calculations in UTC and then localize with Format what is shown to the user.<br>This should also work for Jussi's calculations, or not?</div><div><br></div><div>Regards</div><span class="HOEnZb"><font color="#888888"><div>Gianluigi<br></div></font></span><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"></div></div>
<br>
----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer" target="_blank">https://www.hostsharing.net</a> ]----<br>
<br></blockquote></span></div><br></div></div>
<br><br>
----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer" target="_blank">https://www.hostsharing.net</a> ]----<br>
<br></blockquote></div><br></div>