Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #6972

Re: GetTimeZoneDiff() documentation missing

Subject Re: GetTimeZoneDiff() documentation missing
From Camille Kater <katercam@pt.lu>
Date Tue, 17 Jun 2014 09:30:08 +0200
Message-ID <1402991069_7@vo.lu> (permalink)
References <lnda6q$fp4$1@speranza.aioe.org> <1402661063_1@vo.lu> <lnf96h$6bi$1@speranza.aioe.org> <c05vreF9ba0U1@mid.individual.net> <1402933274_5@vo.lu> <lnnbr0$9ku$1@speranza.aioe.org>
Lines 107
NNTP-Posting-Host 188.115.14.175
Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.datemas.de!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!news.vo.lu!not-for-mail
Newsgroups comp.lang.clipper.visual-objects
X-Trace vo.lu 1402991069 188.115.14.175 (17 Jun 2014 09:44:29 0200)
User-Agent Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0
MIME-Version 1.0
In-Reply-To <lnnbr0$9ku$1@speranza.aioe.org>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 8bit
X-Antivirus avast! (VPS 140616-0, 16/06/2014), Outbound message
X-Antivirus-Status Clean
Xref csiph.com comp.lang.clipper.visual-objects:6972

Show key headers only | View raw


Hi Jamal,

Many thanks. It works for me.
I can extract the date/time from a Unix timestamp I got via mail.
Now I must do the inverse: translate a date/time into a Unix timestamp 
in order to reply to the mail. How can I do that ?

Again many thanks for your help.

Camille

On 16/06/2014 20:08, Jamal wrote:
> Hi Camille,
>
> Based on Karl-Heinz functions, here is some code that may help. See my
> other post with the modifications.
>
> The sample below returns both current Epoch Time and todays's date and
> current time.
>
> How does it work for you?
>
> Jamal
>
>
> FUNCTION Start()
>    TestEpoch()
> WAIT
>
> return nil
>
> function TestEpoch() as void pascal
>
> local nHours as int
> local nMinutes as int
> local nSeconds as int
> local aDateTime as array
> local iEpoch as int
> local cTime24 as string
>
>         cTime24 := Time24()
>         nHours := Val(SubStr3(cTime24, 1,2))
>         nMinutes := Val(SubStr3(cTime24, 4,5))
>         nSeconds := Val(SubStr3(cTime24, 6,7))
>
>         iEpoch := WinDateTime2UnixDateTime(Today(), nHours, nMinutes,
> nSeconds, false)
>
>         ? "Epoch Time", iEpoch
>
>         aDateTime := UnixDateTime2WinDateTime(iEpoch, false)
>
>         ? "UTC/GMT Time", aDateTime[1], aDateTime[2]
>
>         aDateTime :=  UnixDateTime2WinDateTime(iEpoch, true)
>         ? "Local Time: ", aDateTime[1], aDateTime[2]
>
>
>     RETURN
>
> "Camille Kater"  wrote in message news:1402933274_5@vo.lu...
>
> Hi Karl-Heinz,
>
> I would be very interested in those VO functions.
> Thanks
>
> Camille
>
>
> On 15/06/2014 18:27, Karl-Heinz wrote:
>> Hi Jamal,
>>
>>> I wrote some VO function to do the Unix Epoch time conversion which I
>>> am still testing for accuracy for different time zones and daylight
>>> savings. I did not have to use the GetTimeZoneDiff().
>>
>> yes, i doubt that  GetTimeZoneDiff() does anything useful. Assuming the
>> func should return the bias in hours, it should return  in a german
>> environment -2, (UTC+01:00 + 1 hour daylight ). But if it would work as
>> one might expect it would fail in timezones like "Adelaide UTC+09:30 ".
>> In such cases the minutes are truncated because GetTimeZoneDiff() is
>> declared as INT. Anyway, are you using  in your VO code
>> "SystemTimeToTzSpecificLocalTime" and  "TzSpecificLocalTimeToSystemTime"
>> to calc unix- <> windows-datetimestamps ?  It seems that both funcs do
>> not require any TimeZone calculations, and that they are smart enough to
>> use automatically the correct bias on a given date. If you are
>> interested i´ll put some VO snippets  based on both funcs together.
>>
>> regards
>> Karl-Heinz
>>
>

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

GetTimeZoneDiff() documentation missing "Jamal" <someone@example.com> - 2014-06-12 18:39 -0400
  Re: GetTimeZoneDiff() documentation missing Camille Kater <katercam@pt.lu> - 2014-06-13 13:49 +0200
    Re: GetTimeZoneDiff() documentation missing "Jamal" <someone@example.com> - 2014-06-13 12:34 -0400
      Re: GetTimeZoneDiff() documentation missing Camille Kater <katercam@pt.lu> - 2014-06-14 09:57 +0200
      Re: GetTimeZoneDiff() documentation missing "Karl-Heinz" <invalid@invalid.invalid> - 2014-06-15 18:27 +0200
        Re: GetTimeZoneDiff() documentation missing "Jamal" <someone@example.com> - 2014-06-15 21:31 -0400
          Re: GetTimeZoneDiff() documentation missing "Karl-Heinz" <invalid@invalid.invalid> - 2014-06-16 14:45 +0200
            Re: GetTimeZoneDiff() documentation missing "Jamal" <someone@example.com> - 2014-06-16 18:49 +0300
              Re: GetTimeZoneDiff() documentation missing "Karl-Heinz" <invalid@invalid.invalid> - 2014-06-17 08:49 +0200
        Re: GetTimeZoneDiff() documentation missing Camille Kater <katercam@pt.lu> - 2014-06-16 17:26 +0200
          Re: GetTimeZoneDiff() documentation missing "Jamal" <someone@example.com> - 2014-06-16 14:08 -0400
            Re: GetTimeZoneDiff() documentation missing Camille Kater <katercam@pt.lu> - 2014-06-17 09:30 +0200
              Re: GetTimeZoneDiff() documentation missing "Jamal" <someone@example.com> - 2014-06-17 10:37 -0400
                Re: GetTimeZoneDiff() documentation missing Camille Kater <katercam@pt.lu> - 2014-06-18 09:34 +0200
          Re: GetTimeZoneDiff() documentation missing "Karl-Heinz" <invalid@invalid.invalid> - 2014-06-17 08:47 +0200

csiph-web