Multimobile Development: Building Applications for any Smartphone
Timezones - who can answer this
Messages   Related Types
This message was discovered on microsoft.public.dotnet.languages.csharp.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.

Dave
I need to convert times between various timezones.... however it seems like
all of the TimeZone functions only deal with the time zone of the PC.

Why is the TimeZone class abstract? Do i have to basically make my own
class and inherit from TimeZone to implement the functionality I need?

Reply to this message...
Vote that this is a GOOD answer...
 
Really good experience at the Apple Store
MonoDroid – looking *awesome*
 
    
NETMaster (VIP)
Unfortunately, Windows and .NET only have a concept
of one single, current system-wide time-zone...
(= .NET internal 'CurrentSystemTimeZone' class)

For WIN32:
even the function
SystemTimeToTzSpecificLocalTime()
is not on Win9x, only on NT, and reverse
TzSpecificLocalTimeToSystemTime()
was just introduced for Windows XP!

You may have to workaround:
- get zone information (TZI) from registry
(MS KB Q115231)
- manualy add offsets to UTC times...
(e.g. MS KB Q128126)

also read the 'ClockRack' article by Charles Petzold:
http://www.pcmag.com/article/0,2997,s%253D1478%2526a%253D4914,00.asp

and java has (as for the new J#.NET)
SimpleTimeZone class derived from TimeZone

NETMaster
http://www.cetus-links.org/oo_csharp.html

"Dave" <Click here to reveal e-mail address> wrote in message news:#PqrglEUBHA.1432@tkmsftngp07...
[Original message clipped]

Reply to this message...
Vote that this is a GOOD answer...
 
 
    
Jonathan Allen
There should have been a method that returns all the Time Zones that the
computer knows about. Just as it can return a list of Fonts or Printers.

--
Jonathan Allen

"NETMaster" <Click here to reveal e-mail address> wrote in message
news:e7NMtvKUBHA.1608@tkmsftngp05...
[Original message clipped]

Reply to this message...
Vote that this is a GOOD answer...
 
 
    
Michael \(michka\) Kaplan
That is an opinion.

But the priority of the first version was obviously to give the
functionality of Win32 to the managed world. Future versions will
undoubtably expand on it.... but I would not ecxpect time zones to be a
terribly visible feature that would be expected to "jump the tracks" and get
done earlier?

--
MichKa

Michael Kaplan
(principal developer of the MSLU)
Trigeminal Software, Inc. -- http://www.trigeminal.com/
the book -- http://www.i18nWithVB.com/

"Jonathan Allen" <Click here to reveal e-mail address> wrote in message
news:#0bySqqUBHA.832@tkmsftngp07...
[Original message clipped]

Reply to this message...
Vote that this is a GOOD answer...
 
First volume of Multimobile Development nearly ready to go to press
A mention on Developing for the iPhone and Android: The pros and cons
 
    
Jonathan Allen
[Original message clipped]

I think they would be very helpful when designing Internet applications.
Unless everyone switches to GMT, time conversions are going to be very
frequent.

--
Jonathan Allen

"Michael (michka) Kaplan" <Click here to reveal e-mail address> wrote
in message news:O1AplxqUBHA.1400@tkmsftngp03...
[Original message clipped]

Reply to this message...
Vote that this is a GOOD answer...
 
First chapters of Multimobile Development book now available on Apress Alpha program
iPad
 
    
Michael \(michka\) Kaplan
"Jonathan Allen" <Click here to reveal e-mail address> wrote in message
news:OABfZk5UBHA.1688@tkmsftngp05...
[Original message clipped]

This assumes that most people who design web services now or will design
them in the future keep international issues in mind? In my experience, most
people do not REAL:IZE what the first to initials of WWW stand for.

I am sure this is the sort of thing that will be looked at in 7.l or 7..x or
8.0 or whatever they call it, but in the meantime there are always third
party solutions, and there is JScript.Net (not to mention there is the long
standing solution used in e-mail that has the client convert to GMT).

In other words, no shortage of solutions, today or tomorrow. :-)

--
MichKa

Michael Kaplan
(principal developer of the MSLU)
Trigeminal Software, Inc. -- http://www.trigeminal.com/
the book -- http://www.i18nWithVB.com/

Reply to this message...
Vote that this is a GOOD answer...
 
 
    
Dave
[Original message clipped]

Thanks for confirming what I was thinking. This really is a hole in the
..NET libraries.

I am creating my own class to handle arbitrary time zone conversions. It's
not that difficult but it shouldn't have to be done in the first place!

Reply to this message...
Vote that this is a GOOD answer...
 
New book project – Multimobile Development: Building Applications for any Smartphone
Dive into HTML5
 
    
Dave
[Original message clipped]

Are you saying that J# will have a SimpleTimezone class?

MICROSOFT: WHY DIDN'T YOU IMPLEMENT A CONCRETE TIME ZONE CLASS IN THE .NET
LIBRARIES??? The abstract TimeZone class is virtually worthless as is.

Does anyone know about 3rd party libraries for doing time zone conversions?

Reply to this message...
Vote that this is a GOOD answer...
 
Steve Jobs’ thoughtful/thought provoking Thoughts on Flash…
Handy list of countries in CSV format
 
    
Michael \(michka\) Kaplan
"Dave" <Click here to reveal e-mail address> wrote...

> MICROSOFT: WHY DIDN'T YOU IMPLEMENT A CONCRETE TIME ZONE CLASS IN THE
..NET
> LIBRARIES??? The abstract TimeZone class is virtually worthless as is.

UM, worthless to YOU because of what you want. That does not make it
worthless for others.

The same way my bicycle is worthless to get people from here to Sweden --
but very useful to ride around here? Or the way that 777-300 is useless to
get me to the grocery store?

You might want to choose your words with a bit more care....

--
MichKa

Michael Kaplan
(principal developer of the MSLU)
Trigeminal Software, Inc. -- http://www.trigeminal.com/
the book -- http://www.i18nWithVB.com/

Reply to this message...
Vote that this is a GOOD answer...
 
 
 
System.TimeZone




Ad
BootFX
Reliable and powerful .NET application framework.
iOS, Android and Windows Phone Development Training and Consultancy
Hosted by RackSRV Communications
 
Multimobile Development: Building Applications for any Smartphone
Copyright © AMX Software Ltd 2008-2010. Portions copyright © Matthew Baxter-Reynolds 2001-2010. All rights reserved.
Contact Us - Terms of Use - Privacy Policy - 4.0.30129.1734