On Sat, 28 Mar 2009, Guy Roussin wrote:
> Hi Przemek,
> Why i get this :
> ? hb_ntot( HB_MILLISECONDS() )
> 00/00/00 00:00:00.000

Because HB_MILLISECONDS() returns julian time in milliseconds.
I guess you wanted to make sth like:
   ? hb_ntot( HB_MILLISECONDS() / ( 24 * 60 * 60 * 1000 ) )
And you were confused by missing: / ( 24 * 60 * 60 * 1000 )
in exmaple I sent. Sorry, my typo.
I think this code should help you:

   #define MILLISEC_PER_DAY      ( 24 * 60 * 60 * 1000 )

   proc main()
      ? " local time:", hb_datetime()
      ? "   UTC time:", utc_time()
      ?
      ? utc_time() - t"1970-01-01", "days"
      ? int( ( utc_time() - t"1970-01-01" ) * MILLISEC_PER_DAY ), "milliseconds"
   return

   func utc_time()
   return hb_ntot( hb_milliSeconds() / MILLISEC_PER_DAY )


best regards,
Przemek
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to