[Gambas-bugtracker] Bug #1448: Date is not correct when you read mysql database

bugtracker at gambaswiki.org bugtracker at gambaswiki.org
Tue Nov 6 15:45:11 CET 2018


http://gambaswiki.org/bugtracker/edit?object=BUG.1448&from=L21haW4-

zerkowski CHRISTOPHE reported a new bug.

Summary
-------

Date is not correct when you read mysql database

Type             : Bug
Priority         : Medium
Gambas version   : Unknown
Product          : Unknown


Description
-----------

2 bugs
- in gambas when you read mysql data base date format is now mm/dd/aaaa hh:mm:ss when before it was mm/dd/aaaa
- when you read date from mysql , in gambas one day is substract from date !

code gambas use :


Public Sub Button1_Click()
Dim $cCon As Connection
Dim r As String
Dim res As Result

  $cCon = New Connection
   With $cCon
    .Type = "mysql"
    .Host = "127.0.0.1"
    .Login = "root"
    .Password = "******"
    .Name = "livres"
    .Open
  End With
  r = "select * from livres where numero=122"
  res = $cCon.Exec(r)
  Print ">> gambas : " & res["datecreation"] 
----------------------------------------------

--------------------------
mysql result
--------------------------
mysql> use livres;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> select datecreation from livres where numero=122
    -> ;
+--------------+
| datecreation |
+--------------+
| 2009-02-19   |
+--------------+
1 row in set (0.05 sec)

mysql>

----------------------------------------
gambas result with test program
----------------------------------------
>> gambas : 02/18/2009 22:00:00


System information
------------------

[System]
Gambas=3.11.4
OperatingSystem=Linux
Kernel=4.15.0-38-generic
Architecture=x86_64
Distribution=Ubuntu 18.04.1 LTS
Desktop=XFCE
Theme=Gtk
Language=fr_FR.UTF-8
Memory=1950M

[Libraries]
Cairo=libcairo.so.2.11510.0
Curl=libcurl.so.4.5.0
DBus=libdbus-1.so.3.19.4
GStreamer=libgstreamer-1.0.so.0.1401.0
GTK+2=libgtk-x11-2.0.so.0.2400.32
GTK+3=libgtk-3.so.0.2200.30
OpenGL=libGL.so.1.0.0
Poppler=libpoppler.so.73.0.0
QT4=libQtCore.so.4.8.7
QT5=libQt5Core.so.5.9.5
SDL=libSDL-1.2.so.0.11.4
SQLite=libsqlite3.so.0.8.6

[Environment]
CLUTTER_BACKEND=x11
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
DEFAULTS_PATH=/usr/share/gconf/xubuntu.default.path
DESKTOP_SESSION=xubuntu
DISPLAY=:0.0
GB_GUI=gb.qt4
GDMSESSION=xubuntu
GDM_LANG=fr_FR
GIO_LAUNCHED_DESKTOP_FILE=/usr/share/applications/gambas3.desktop
GIO_LAUNCHED_DESKTOP_FILE_PID=1254
GLADE_CATALOG_PATH=:
GLADE_MODULE_PATH=:
GLADE_PIXMAP_PATH=:
GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1
GTK_OVERLAY_SCROLLING=0
HOME=<home>
LANG=fr_FR.UTF-8
LANGUAGE=fr_FR
LOGNAME=<user>
MANDATORY_PATH=/usr/share/gconf/xubuntu.mandatory.path
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
PWD=<home>
QT_ACCESSIBILITY=1
QT_QPA_PLATFORMTHEME=gtk2
SESSION_MANAGER=local/<hostname>:@/tmp/.ICE-unix/992,unix/<hostname>:/tmp/.ICE-unix/992
SHELL=/bin/bash
SHLVL=0
SSH_AGENT_PID=974
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
TZ=:/etc/localtime
USER=<user>
XAUTHORITY=<home>/.Xauthority
XDG_CONFIG_DIRS=/etc/xdg/xdg-xubuntu:/etc/xdg:/etc/xdg
XDG_CURRENT_DESKTOP=XFCE
XDG_DATA_DIRS=/usr/share/xubuntu:/usr/share/xfce4:/usr/local/share:/usr/share:/var/lib/snapd/desktop:/usr/share
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/<user>
XDG_MENU_PREFIX=xfce-
XDG_RUNTIME_DIR=/run/user/1000
XDG_SEAT=seat0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_SESSION_DESKTOP=xubuntu
XDG_SESSION_ID=c1
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SESSION_TYPE=x11
XDG_VTNR=7




More information about the Bugtracker mailing list