[Gambas-user] Possible CDATE issue Latest version
jussi.lahtinen at gmail.com
Fri Nov 18 23:34:43 CET 2022
Are you sure this has worked before?
By quick look I guess it is about how Gambas does the conversions
internally, print uses Str() and maybe that "ddate =" or uses Cstr().
On Fri, Nov 18, 2022 at 11:28 PM Brian G <brian at westwoodsvcs.com> wrote:
> With the latest version of gambas, I am getting the strangest issue, I
> dont understand, not sure if its a bug
> cdate returns different values if called with a class public variable.
> Locks like possibly like in the last case
> its return the gmt time.
> Hello world 11/18/2022 11:30:56
> CDATE(now) 11/18/2022 11:30:56
> Eval("cdate(now) 11/18/2022 11:30:56
> Try ddate = Eval(thedate) 11/18/2022 19:30:56.895
> I ran the following script to test. This issue popped up in some of my apps
> #!/usr/bin/env gbs3
> class mydate
> ' Gambas class file
> Public thedate As String
> Public Sub _call()
> Dim ddate As String
> Try ddate = Eval(thedate)
> Print "CDATE(now) \t"; CDate(Now)
> Print "Eval(\"cdate(now) \t"; Eval("cdate(now)")
> Print "Try ddate = Eval(thedate) \t"; ddate
> end class
> public sub main()
> Print "Hello world \t"; CDate(Now)
> Dim getdate As New Mydate
> getdate.thedate = "cdate(now)"
> "Failure is the key to success;
> each mistake teaches us something" .. Morihei Ueshiba
> Brian G
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the User