Get real date from the Internet

Horizon
Posts: 1323
Joined: Fri May 23, 2008 1:33 pm
Has thanked: 4 times

Re: Get real date from the Internet

Post by Horizon »

Thank you Antonio.
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
User avatar
RAMESHBABU
Posts: 626
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Re: Get real date from the Internet

Post by RAMESHBABU »

Dear Antonio,

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

-Ramesh Babu
User avatar
Antonio Linares
Site Admin
Posts: 42529
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 77 times
Contact:

Re: Get real date from the Internet

Post by Antonio Linares »

Dear Ramesh,

Here it is working fine

Lets check it with Mr. Rao
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: Get real date from the Internet

Post by nageswaragunupudi »

Working perfectly for me too here:

This is my code:

Code: Select all | Expand

    ? "NOW()=", Now(), "HB_DATETIME()=", ;
      HB_DateTime(), ;
     "Current time: " + FW_Transform( HB_DateTime(), "ddd mmm dd hh:mm:ss yyyy" )
Result:
Image

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

G. N. Rao.
Hyderabad, India
User avatar
RAMESHBABU
Posts: 626
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Re: Get real date from the Internet

Post by RAMESHBABU »

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
User avatar
Antonio Linares
Site Admin
Posts: 42529
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 77 times
Contact:

Re: Get real date from the Internet

Post by Antonio Linares »

Dear Ramesh,

Are you using xHarbour ? What C compiler are you using ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
RAMESHBABU
Posts: 626
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Re: Get real date from the Internet

Post by RAMESHBABU »

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
User avatar
Enrico Maria Giordano
Posts: 8753
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 4 times
Contact:

Re: Get real date from the Internet

Post by Enrico Maria Giordano »

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=down ... naries_win

And the latest BCC from here:

http://xharbour.org/index.asp?page=down ... quired_win
User avatar
Antonio Linares
Site Admin
Posts: 42529
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 77 times
Contact:

Re: Get real date from the Internet

Post by Antonio Linares »

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
User avatar
RAMESHBABU
Posts: 626
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Re: Get real date from the Internet

Post by RAMESHBABU »

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
User avatar
RAMESHBABU
Posts: 626
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Re: Get real date from the Internet

Post by RAMESHBABU »

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=down ... naries_win

And the latest BCC from here:

http://xharbour.org/index.asp?page=down ... quired_win
I have upgraded my xHarbour and BCC versions.

Thank your very much for your advise.

-Ramesh Babu P
Post Reply