FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Get real date from the Internet
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: Get real date from the Internet
Posted: Sat Jan 07, 2023 09:24 AM

Thank you Antonio.

Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 654
Joined: Fri Oct 21, 2005 05:54 AM
Re: Get real date from the Internet
Posted: Tue Oct 17, 2023 12:50 PM
Dear Antonio,

Now() function is giving a wrong date as under:
Current time: Wed Oct 18 18:19:14 2023
Please help.

-Ramesh Babu
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Get real date from the Internet
Posted: Tue Oct 17, 2023 01:48 PM

Dear Ramesh,

Here it is working fine

Lets check it with Mr. Rao

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Get real date from the Internet
Posted: Tue Oct 17, 2023 06:32 PM
Working perfectly for me too here:

This is my code:
Code (fw): Select all Collapse
    ? "NOW()=", Now(), "HB_DATETIME()=", ;
      HB_DateTime(), ;
     "Current time: " + FW_Transform( HB_DateTime(), "ddd mmm dd hh:mm:ss yyyy" )
Result:


Note:
If you are using xHarbour, use DateTime() instead of HB_DateTime()
Regards



G. N. Rao.

Hyderabad, India
Posts: 654
Joined: Fri Oct 21, 2005 05:54 AM
Re: Get real date from the Internet
Posted: Wed Oct 18, 2023 01:40 AM

Hi Nageswara Rao gaaru/Antonio,

I am getting the wrong internet date, when the system date is wrongly changed to

a date, other than actual date.

Thank you for your attention

-Ramesh Babu P

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Get real date from the Internet
Posted: Wed Oct 18, 2023 09:55 AM

Dear Ramesh,

Are you using xHarbour ? What C compiler are you using ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 654
Joined: Fri Oct 21, 2005 05:54 AM
Re: Get real date from the Internet
Posted: Thu Oct 19, 2023 12:19 AM
Dear Antonio,
Are you using xHarbour ? What C compiler are you using ?
xHarbour 1.2.3 Intl. (SimpLex) (Build 20201212)
Embarcadero C++ 7.00 for Win32 Copyright (c) 1993-2015 Embarcadero Technologies, Inc.

Thank you,

-Ramesh Babu P
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Get real date from the Internet
Posted: Thu Oct 19, 2023 07:36 AM
Ramesh,

why are you using such an old version of xHarbour? Please download the latest build of xHarbour from here:

http://xharbour.org/index.asp?page=download/windows/binaries_win

And the latest BCC from here:

http://xharbour.org/index.asp?page=download/windows/required_win
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Get real date from the Internet
Posted: Thu Oct 19, 2023 10:56 AM
Dear Ramesh,
I am getting the wrong internet date, when the system date is wrongly changed to
a date, other than actual date.
The wrong date that you get is the same as the wrongly changed date ?

What Windows version are you using ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 654
Joined: Fri Oct 21, 2005 05:54 AM
Re: Get real date from the Internet
Posted: Fri Oct 20, 2023 02:14 AM

Dear Antonio,

>> The wrong date that you get is the same as the wrongly changed date ?

Yes.

>> What Windows version are you using ?

Windows 7 Ultimate (Service Pack 1)

Thank you,

-Ramesh Babu P

Posts: 654
Joined: Fri Oct 21, 2005 05:54 AM
Re: Get real date from the Internet
Posted: Mon Oct 23, 2023 02:37 AM
Dear Enrico,
Ramesh,

why are you using such an old version of xHarbour? Please download the latest build of xHarbour from here:

http://xharbour.org/index.asp?page=download/windows/binaries_win

And the latest BCC from here:

http://xharbour.org/index.asp?page=download/windows/required_win
I have upgraded my xHarbour and BCC versions.

Thank your very much for your advise.

-Ramesh Babu P

Continue the discussion