AnsweredAssumed Answered

vrf wrong time

Question asked by g.nied on Apr 22, 2002
Hi Lars,

I am currently developing an TCP/IP application with VEE, Visual Basic and
ADO. In order to have a consistent time A always use GMT in my tables. So I
am not surprised you ran into that time problems ...

The two hours difference are from your time zone (GMT+1) and the currently
active daylight saving setting. This adds another hour, so you are 2 hours
before GMT.

There are functions that return the GMT time (system time) and others that
give you the local time. VEE's now() funcion for example gives you the local
time. So you have to substract the two hours time offset from the local time
to get the system time.

The time offset can be obtained by different methods: you can read the
current timezone settings with the WINAPI or you can read the local time and
the system time with WINAPI and calc the difference.

     Georg Nied
Software-Development
Test and Measurement
51149 Cologne  Germany
g.nied@gn-software.de


-----Original Message-----
From: owner-vrf@lvld.agilent.com [mailto:owner-vrf@lvld.agilent.com]On
Behalf Of lars.iversen@nokia.com
Sent: Tuesday, April 23, 2002 12:04 PM
To: vrf@lvld.agilent.com
Subject: vrf wrong time


Hi
I'm using an SQL server 2000 database with my VEE 6.0 application.
I'm using ADO 2.5 SP2 on Windows NT 4 and I'm located in Denmark (GMT+1).
My problem is that if I query the database for the time  (Now()in VEE,
Getdate() in SQL)
the time is wrong !
Example of my query:   SELECT Getdate() From Mytable
If I try this query in VB or C++ i get the correct time. lets say:
2002-04-23 11:02:59
But if I do this in VEE I get 2002-04-23 13:02:59
Does anybody know why there is a 2 hour difference?
Thanks in advance
Lars Iversen

---------------------------------------------------------------------
This is the "vrf" maillist, managed by Majordomo.  To send messages to
this maillist, just email to "vrf@lvld.agilent.com".  Subscriptions and
unsubscriptions are done through the address "vrf-request@lvld.agilent.com".
If you need details, just send a message containing the text "help"
to "vrf-request@lvld.agilent.com".
---------------------------------------------------------------------

Outcomes