<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 15/11/22 1:16 pm, Jussi Lahtinen
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAFJMe7Qwbfr2ha8JgO=qtU8xE-dfjXk8=q2a+RssrAz1_eLn+A@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>This is related to what I have tried to explain several
          times. The date datatype does not contain timezone
          information, UTC is always used internally and what is shown
          is adjusted according to the currently used timezone. Thus you
          can't get correct results like that. It does not work like a
          paper calendar.<br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>Jussi<br>
        </div>
        <div dir="ltr"><br>
        </div>
        <br>
      </div>
    </blockquote>
    <p>Maybe I am finally starting to see your issue. <br>
    </p>
    <p>But the date and time are correct in that they are a specific
      instance. I have changed the TZ in Env to several places and it
      always returns the same date and time. What I think here is wrong
      is that Gambas is just printing the Env["TZ"] value, it is not
      looking at the date and deciding which <b>local timezone</b> to
      print based on that date.</p>
    <p>So if you and I agree to meet for lunch in Honolulu at 12:30
      America/Hawaii next MayDay to both of us the Date value should be
      2492170.52083333 and should not change no matter what the current
      TZ is on our respective laptops. However when you display that
      date (in ECT?) it should be 1/May/2023 12:30pm <u>unless you want
        to see what date/time it would be in "your time" or "my time"
        etc.</u> Is that what you are getting at? <br>
    </p>
    <p>AFAIK we dont have a datetime conversion function. Historically,
      I have used a postgres function to do this like "SELECT '2023-5-1
      12:30 HST' AT TIME ZONE 'ACDT';" as it was easier than doing the
      complex conversion myself.</p>
    <p>b<br>
    </p>
  </body>
</html>