Re: How to compare DateTime Objects?
- From: "William Stacey [MVP]" <william.stacey@xxxxxxxxx>
- Date: Fri, 23 Dec 2005 11:52:04 -0500
Not exactly sure what the question is here. If the server records in GMT
(00:00) (i.e. UTC) that is good. It does not matter what time zone the
server is actually in as long as it records in UTC. So normally, all
clients will send time in UTC so the server does not have to know the
client's time zone. Then the clients can make any required conversions for
display based on their local time. If the server, for some reason, needs to
work with the client's local time (i.e. reports, etc.) then you need to get
(or have stored) the client's time zone so that you can make the conversion
from UTC to local time *for the client. I have some code that will take a
user's standard time zone name and convert a UTC time to a local time at the
server. What are you trying to do?
--
William Stacey [MVP]
"clintonG" <csgallagher@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:%23vlwGN2BGHA.2920@xxxxxxxxxxxxxxxxxxxxxxx
> No, I think the answer if any would be parse with g and reformat with r.
> I've got a real problem I've discovered and nobody has been able to tell
> me the facts yet.
>
> Using the 2.0 Website Administrator Tool e (WAT) addes new users to the
> aspnet_Users table (Membership) in GMT(00:00) when the server the WAT runs
> on is for example in GMT(-06:00). That is WAT records the time 6 hours
> into the future. I'll never know what time it was in the user's local time
> as a result.
>
> I need to work with GMT as it is the format required by syndicated feeds
> but I have no experience with conversions, comparsions and magic tricks
> like trying to determine what the local time was when a user was added to
> the Membership database.
>
> I haven't even been able to learn if the WAT is recording time as would be
> expected as I always assumed the "standard" was to record time using the
> time of the server or getting it from the client and using that value.
>
> <%= Clinton Gallagher
>
> "Jon Skeet [C# MVP]" <skeet@xxxxxxxxx> wrote in message
> news:MPG.1e14f5fbf133640698cb9f@xxxxxxxxxxxxxxxxxxxxxxx
>> clintonG <csgallagher@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>>> Well, I'm wondering about values represented by or returned by a current
>>> date, start date and end date as the OP asked about and started thinking
>>> about comparison methods when formatters may have been involved.
>>
>> Well, I'd hope that by the time the OP has the date/times as DateTimes
>> rather than strings (if they ever were strings) they'd be correct - so
>> whatever formatting has happened before *should* be irrelevant.
>>
>>> Consider all the formatters in this cheat *** [1] motivated me to
>>> wonder
>>> if there is a "transformation" methodology that has been developed or
>>> can be
>>> learned. How to transform from 'g' to 'r' for example?
>>
>> Parse with g and reformat with r? Sounds like the easiest way to me :)
>>
>> I get the feeling I'm still missing your point.
>>
>> --
>> Jon Skeet - <skeet@xxxxxxxxx>
>> http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
>> If replying to the group, please do not mail me too
>
>
.
- References:
- How to compare DateTime Objects?
- From: conckrish
- Re: How to compare DateTime Objects?
- From: jesper_lofgren
- Re: How to compare DateTime Objects?
- From: Jon Skeet [C# MVP]
- Re: How to compare DateTime Objects?
- From: clintonG
- Re: How to compare DateTime Objects?
- From: Jon Skeet [C# MVP]
- Re: How to compare DateTime Objects?
- From: clintonG
- Re: How to compare DateTime Objects?
- From: Jon Skeet [C# MVP]
- Re: How to compare DateTime Objects?
- From: clintonG
- How to compare DateTime Objects?
- Prev by Date: Re: Design, enums, and const ints
- Next by Date: Re: Yet another threading/invoking question...
- Previous by thread: Re: How to compare DateTime Objects?
- Next by thread: Re: How to compare DateTime Objects?
- Index(es):