Click here to Skip to main content
12,253,679 members (59,156 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

6.4K views
Posted

How to convert UTC time to Local Time

, 2 Jan 2012 CPOL
Rate this:
Please Sign up or sign in to vote.
I wanted to point out that while I agree with the general approach (storing DateTime in UTC and converting into local time for display as well as accepting input in local time), it's not always what the requirements call for. If you're creating a meeting calendar, then of course it's perfect,...
I wanted to point out that while I agree with the general approach (storing DateTime in UTC and converting into local time for display as well as accepting input in local time), it's not always what the requirements call for. If you're creating a meeting calendar, then of course it's perfect, or in fact anything where the time displayed need to be universal... but there are applications where the underlying intent is to different. For example, the office closes early, at 4:00 on new years eve this year. You don't want your folks who work in the USA leaving work at 16:00 Ukrainian time Smile | :) .

I guess what I mean to get across is that DateTime work is tricky enough even when the intent is clear, but the intent is not always the same. So it's good to make sure you're solving the right problem.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Tom Clement
Product Manager
United States United States
I've been programming in C, C++, Visual Basic and C# for almost 30 years. I've worked at Sierra Systems, ViewStar, Mosaix, Lucent, Avaya, Avinon, Apptero, Serena and now Guidewire Software in various roles over my career.

You may also be interested in...

Comments and Discussions

 
GeneralMy vote of 1 Pin
Bruce Schiller25-Jan-13 14:35
memberBruce Schiller25-Jan-13 14:35 
GeneralRe: My vote of 1 Pin
Tom Clement25-Jan-13 15:28
mentorTom Clement25-Jan-13 15:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160426.1 | Last Updated 2 Jan 2012
Article Copyright 2012 by Tom Clement
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid