[Gambas-user] Possible CDATE issue Latest version
Brian G
brian at westwoodsvcs.com
Fri Nov 18 20:36:30 CET 2022
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
end class
public sub main()
Print "Hello world \t"; CDate(Now)
Dim getdate As New Mydate
getdate.thedate = "cdate(now)"
getdate()
end
+++++++++++++++++++++++++++++++++++++++
"Failure is the key to success;
each mistake teaches us something" .. Morihei Ueshiba
Brian G
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20221118/c97c2120/attachment.htm>
More information about the User
mailing list