Timezones - who can answer this 
Author Message
 Timezones - who can answer this

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?



Sat, 27 Mar 2004 06:34:16 GMT  
 Timezones - who can answer this
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

Quote:

> 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?



Sat, 27 Mar 2004 18:19:37 GMT  
 Timezones - who can answer this

Quote:
> Unfortunately, Windows and .NET only have a concept
> of one single, current system-wide time-zone...

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!



Tue, 30 Mar 2004 01:56:24 GMT  
 Timezones - who can answer this

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

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?



Tue, 30 Mar 2004 04:54:55 GMT  
 Timezones - who can answer this

Quote:

> 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/



Tue, 30 Mar 2004 05:30:21 GMT  
 Timezones - who can answer this
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


Quote:
> 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




- Show quoted text -

Quote:
> > 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?



Tue, 30 Mar 2004 07:07:10 GMT  
 Timezones - who can answer this
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/


Quote:
> 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



> > 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



> > > 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?



Tue, 30 Mar 2004 07:28:00 GMT  
 Timezones - who can answer this

Quote:
> I would not ecxpect time zones to be a
> terribly visible feature that would be expected to "jump the tracks" and
get
> done earlier?

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



Quote:
> 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/



> > 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



> > > 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



> > > > 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?



Wed, 31 Mar 2004 11:33:20 GMT  
 Timezones - who can answer this

Quote:
> > I would not ecxpect time zones to be a terribly visible feature
> > that would be expected to "jump the tracks" and get done
> > earlier?
> I think they would be very helpful when designing Internet applications.
> Unless everyone switches to GMT, time conversions are going to be very
> frequent.

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/



Thu, 01 Apr 2004 03:02:34 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. Determining what canned preprocessor symbols are available

2. Beginner [Q] Using Canned File Open/Save dialog

3. Help with compiling a "canned" program

4. Canned Dialogs

5. Automatic DateTime formating between TimeZones?

6. Date and Time in Different Timezones

7. time_t, tm*, and timezones (please read!)

8. Q: conversion between timezones

9. time_t, tm*, and timezones (please read!)

10. !! Fun With Timezones !!

11. Timezones

12. Timezones

 

 
Powered by phpBB® Forum Software