Get real date from the Internet
Re: Get real date from the Internet
Thank you Antonio.
Regards,
Hakan ONEMLI
Harbour & MSVC 2022 & FWH 23.04
Hakan ONEMLI
Harbour & MSVC 2022 & FWH 23.04
- RAMESHBABU
- Posts: 626
- Joined: Fri Oct 21, 2005 5:54 am
- Location: Secunderabad (T.S), India
Re: Get real date from the Internet
Dear Antonio,
Now() function is giving a wrong date as under:
-Ramesh Babu
Now() function is giving a wrong date as under:
Please help.Current time: Wed Oct 18 18:19:14 2023
-Ramesh Babu
- 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:
- 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
Working perfectly for me too here:
This is my code:
Result:

Note:
If you are using xHarbour, use DateTime() instead of HB_DateTime()
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" )

Note:
If you are using xHarbour, use DateTime() instead of HB_DateTime()
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- RAMESHBABU
- Posts: 626
- Joined: Fri Oct 21, 2005 5:54 am
- Location: Secunderabad (T.S), India
Re: Get real date from the Internet
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
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
- 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
Dear Ramesh,
Are you using xHarbour ? What C compiler are you using ?
Are you using xHarbour ? What C compiler are you using ?
- RAMESHBABU
- Posts: 626
- Joined: Fri Oct 21, 2005 5:54 am
- Location: Secunderabad (T.S), India
Re: Get real date from the Internet
Dear Antonio,
Embarcadero C++ 7.00 for Win32 Copyright (c) 1993-2015 Embarcadero Technologies, Inc.
Thank you,
-Ramesh Babu P
xHarbour 1.2.3 Intl. (SimpLex) (Build 20201212)Are you using xHarbour ? What C compiler are you using ?
Embarcadero C++ 7.00 for Win32 Copyright (c) 1993-2015 Embarcadero Technologies, Inc.
Thank you,
-Ramesh Babu P
- 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
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
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
- 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
Dear Ramesh,
What Windows version are you using ?
The wrong date that you get is the same as the wrongly changed date ?I am getting the wrong internet date, when the system date is wrongly changed to
a date, other than actual date.
What Windows version are you using ?
- RAMESHBABU
- Posts: 626
- Joined: Fri Oct 21, 2005 5:54 am
- Location: Secunderabad (T.S), India
Re: Get real date from the Internet
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
>> 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
- RAMESHBABU
- Posts: 626
- Joined: Fri Oct 21, 2005 5:54 am
- Location: Secunderabad (T.S), India
Re: Get real date from the Internet
Dear Enrico,
Thank your very much for your advise.
-Ramesh Babu P
I have upgraded my xHarbour and BCC versions.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
Thank your very much for your advise.
-Ramesh Babu P