Re: GetEffectiveDateString is bugged?
From: Joe Kaplan \(MVP - ADSI\) (joseph.e.kaplan_at_removethis.accenture.com)
Date: 07/22/04
- Next message: Kevin Robinson: "RE: authorization manager"
- Previous message: Joe Kaplan \(MVP - ADSI\): "Re: Encrypt to readable text"
- In reply to: Paolo: "GetEffectiveDateString is bugged?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 22 Jul 2004 11:10:40 -0500
I get this too and other people have complained about it. Mine are usually
off by 3 hours. I'm not exactly sure what the problem is.
Under the hood, some C++ code is reading the CAPI CERT_INFO structure and
taking the two FILETIME structures for the two cert dates and pasing them to
the constructor on the .NET DateTime that takes a long/tick count. It seems
like it would be better if the code called DateTime.FromFileTime instead,
but I'm not sure if that would fix the problem or not.
I'm hoping the story is better in Whidbey (haven't tried yet with the new
X509 class). Why this class was designed to return a string instead of a
DateTime (it is calling ToString() on the DateTime under the hood!) is
beyond me.
Joe K.
"Paolo" <Paolo@discussions.microsoft.com> wrote in message
news:88811937-4931-435A-A0BE-3464ED49EA9B@microsoft.com...
> I try to get the validity date of a certificate with
GetEffectiveDateString.
> It doesn't return the same dates as the
> certificate viewer included in Windows but it returns a right date but
with a wrong time.
> My pc is located in Italy with +1 GMT and daylight saving time.
> The certficate viewer in Win reports:
> 21/07/2004 03.27.27 PM
> GetEffectiveDateString reports:
> 21/07/2004 05.27.27 AM
>
> Why? Pecche'?
> Thx a lot.
> Paolo
- Next message: Kevin Robinson: "RE: authorization manager"
- Previous message: Joe Kaplan \(MVP - ADSI\): "Re: Encrypt to readable text"
- In reply to: Paolo: "GetEffectiveDateString is bugged?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]