Get real date from the Internet

Re: Get real date from the Internet

Postby Horizon » Sat Jan 07, 2023 9:24 am

Thank you Antonio.
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1288
Joined: Fri May 23, 2008 1:33 pm

Re: Get real date from the Internet

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

Re: Get real date from the Internet

Postby Antonio Linares » Tue Oct 17, 2023 1:48 pm

Dear Ramesh,

Here it is working fine

Lets check it with Mr. Rao
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Get real date from the Internet

Postby nageswaragunupudi » Tue Oct 17, 2023 6:32 pm

Working perfectly for me too here:

This is my code:
Code: Select all  Expand view
   ? "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
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Get real date from the Internet

Postby RAMESHBABU » Wed Oct 18, 2023 1: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
User avatar
RAMESHBABU
 
Posts: 614
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Re: Get real date from the Internet

Postby Antonio Linares » Wed Oct 18, 2023 9:55 am

Dear Ramesh,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Get real date from the Internet

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

Re: Get real date from the Internet

Postby Enrico Maria Giordano » Thu Oct 19, 2023 7: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
User avatar
Enrico Maria Giordano
 
Posts: 8315
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Get real date from the Internet

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Get real date from the Internet

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

Re: Get real date from the Internet

Postby RAMESHBABU » Mon Oct 23, 2023 2: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=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
User avatar
RAMESHBABU
 
Posts: 614
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], nageswaragunupudi and 91 guests