Re: New LifeTime(DateTime) ctor: UTC or not?



Hi SA. LifeTime expects a local time as internally it uses DateTime.Now for compares. So, IIRC, the SCTNew returns a UTC string that is then converted to local time before creating the LifeTime object and storing in the new SCT on the client. Looking at the code again, it seems as that is what I did on the client and server methods. Both client and server use local time in LifeTime. But transfers the XMLSCT in a Zulu string to the client, which the client converts before creating LifeTime. So you may have modified the code in such a way as to pass a UTC time in the LifeTime constructor or there is some funky date issue going on here (i.e. something I missed). I hope it is the first case as that should be easy to fix. If the latter, you may need to add some debug outputs on both side so we can see the UTC and the local DateTimes on both sides that are being created/passed. Please let me know. IMO, things like LifeTime should have been UTC based and IsCurrent and IsExpired could just do the right thing. Cheers.

--
William Stacey, MVP
http://mvp.support.microsoft.com

"SA" <informatica@xxxxxxxxxxx> wrote in message news:O6c9qEZUFHA.3716@xxxxxxxxxxxxxxxxxxxxxxx
Hi all,

Related to William's implementation of a secure context token issuer.

When you are assigning a lifetime object to the SecureContextToken's
LifeTime property like this

Sct.LifeTime = New LifeTime(aDateTimeObject)

Should the datetime be in UTC or local time? I use UTC, but run into
problems. It works for me (on the west side of the prime meridian), but not
for Europeans, which is why I think it is expecting local time.


MSFT: The docs should be more clear on this...

--


Sven.



.



Relevant Pages

  • Re: universal time problem
    ... local time, the wrong time zone and therefore the wrong UTC time. ... > The client can schedule reminders. ... > I have production webservice also, I will call this service B. This ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: What time is it? Issues with Local time, system time, DST
    ... Apparently CE stores time in local time, ... be for local time, not UTC. ... RTC, so that when processor is asleep or off, onboard batteries ... you can't know the UTC unless you also have, in some non-volatile ...
    (microsoft.public.windowsce.platbuilder)
  • RE: Best practice for TOD clock
    ... returns the UTC time. ... local applications that log with local time) for one hour in the fall. ... duplicate timestamps if the timestamps are using UTC time. ... For IBM-MAIN subscribe / signoff / archive access instructions, ...
    (bit.listserv.ibm-main)
  • International datetime comparisons in real-time web apps
    ... UTC and internationalization (cultures, SQL server CONVERT function, how ... Players can place a bet on the event's outcome, up to one minute before it ... deactivate, in Italian local time. ... But this means, the time part of the Italian local time, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Time Bases and Timekeeping (was: Re: Valentins day :-)
    ... UNIX systems usually store the time as UTC, and then adjust for the local time zone. ... The display of UTC/GMT is common when servers don't have a good mechanism for displaying local time on a per-process basis, or when there's a specific reason to use UTC/GMT for all external operations; when the end-users are operating across time zones. ... Yes, I know that UTC and GMT aren't quite the same time, and that time_t only approximates UTC, and that the approximation of UTC isn't quite the same as TAI, either. ...
    (comp.os.vms)