Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / March 2008

Tip: Looking for answers? Try searching our database.

.NET UTC DateTime

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jon Slaughter - 19 Mar 2008 22:19 GMT
Is there a DateTime like object in .NET that handles UTC also? That is, the
object contains the timezone and can properly compare between them.

Or how does one go about handling them if not? My info is
date/time/UTC(like, say +2:00 (EST)) and I want to do the least amount of
work to use those absolute times and compare between them. As far as I can
tell, DateTime doesn't work with UTC extension and I can't seem to find any
other class that will.

Thanks,
Jon
Jeroen Mostert - 19 Mar 2008 22:19 GMT
> Is there a DateTime like object in .NET that handles UTC also? That is, the
> object contains the timezone and can properly compare between them.
[quoted text clipped - 4 lines]
> tell, DateTime doesn't work with UTC extension and I can't seem to find any
> other class that will.

DateTimeOffset.

Signature

J.

Jon Slaughter - 20 Mar 2008 00:43 GMT
>> Is there a DateTime like object in .NET that handles UTC also? That is,
>> the object contains the timezone and can properly compare between them.
[quoted text clipped - 6 lines]
>>
> DateTimeOffset.

thanks, looks like what I'm after.
BlackWasp - 19 Mar 2008 23:27 GMT
Hi Jon,

the DateTime structure does handle UTC to some degree and provides methods
for converting between UTC and local dates.  Check out my articles on the
DateTime structure and how to format it for some details.

C# DateTime Data Type -
http://www.blackwasp.co.uk/CSharpDateTimeDataType.aspx
C# DateTime Manipulation -
http://www.blackwasp.co.uk/CSharpDateManipulation.aspx

Signature

BlackWasp
www.blackwasp.co.uk

> Is there a DateTime like object in .NET that handles UTC also? That is,
> the object contains the timezone and can properly compare between them.
[quoted text clipped - 7 lines]
> Thanks,
> Jon

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.